| 331 | } |
| 332 | |
| 333 | int |
| 334 | cib_remote_dispatch(gpointer user_data) |
| 335 | { |
| 336 | cib_t *cib = user_data; |
| 337 | cib_remote_opaque_t *private = cib->variant_opaque; |
| 338 | |
| 339 | xmlNode *msg = NULL; |
| 340 | const char *type = NULL; |
| 341 | |
| 342 | crm_info("Message on callback channel"); |
| 343 | msg = crm_recv_remote_msg(private->callback.session, private->callback.encrypted); |
| 344 | |
| 345 | type = crm_element_value(msg, F_TYPE); |
| 346 | crm_trace("Activating %s callbacks...", type); |
| 347 | |
| 348 | if (safe_str_eq(type, T_CIB)) { |
| 349 | cib_native_callback(cib, msg, 0, 0); |
| 350 | |
| 351 | } else if (safe_str_eq(type, T_CIB_NOTIFY)) { |
| 352 | g_list_foreach(cib->notify_list, cib_native_notify, msg); |
| 353 | |
| 354 | } else { |
| 355 | crm_err("Unknown message type: %s", type); |
| 356 | } |
| 357 | |
| 358 | if (msg != NULL) { |
| 359 | free_xml(msg); |
| 360 | return 0; |
| 361 | } |
| 362 | return -1; |
| 363 | } |
| 364 | |
| 365 | int |
| 366 | cib_remote_signon(cib_t * cib, const char *name, enum cib_conn_type type) |
nothing calls this directly
no test coverage detected