MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / cib_remote_dispatch

Function cib_remote_dispatch

lib/cib/cib_remote.c:333–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331}
332
333int
334cib_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
365int
366cib_remote_signon(cib_t * cib, const char *name, enum cib_conn_type type)

Callers

nothing calls this directly

Calls 4

crm_recv_remote_msgFunction · 0.85
crm_element_valueFunction · 0.85
cib_native_callbackFunction · 0.85
free_xmlFunction · 0.85

Tested by

no test coverage detected