set_connected_peers(the_cib);
cib_ccm_msg_callback(	oc_ed_t event, void *cookie, size_t size, const void *data){	int instance = -1;	gboolean update_id = FALSE;	gboolean update_quorum = FALSE;		const oc_ev_membership_t *membership = data;	if(membership != NULL) {		instance = membership->m_instance;	}	crm_info("Process CCM event=%s (id=%d)", 		 ccm_event_name(event), instance);	switch(event) {		case OC_EV_MS_NEW_MEMBERSHIP:		case OC_EV_MS_INVALID:			update_id = TRUE;			update_quorum = TRUE;			break;		case OC_EV_MS_PRIMARY_RESTORED:			update_id = TRUE;			break;		case OC_EV_MS_NOT_PRIMARY:			crm_debug("Ignoring transitional CCM event: %s",				  ccm_event_name(event));			break;		case OC_EV_MS_EVICTED:			crm_err("Evicted from CCM: %s", ccm_event_name(event));			update_quorum = TRUE;			break;		default:			crm_err("Unknown CCM event: %d", event);	}		if(update_id) {		CRM_DEV_ASSERT(membership != NULL);		if(crm_assert_failed) { return; }			if(ccm_transition_id != NULL) {			crm_free(ccm_transition_id);			ccm_transition_id = NULL;		}		ccm_transition_id = crm_itoa(instance);		set_transition(the_cib);	}		if(update_quorum) {		unsigned int members = 0;		int offset = 0;		unsigned int lpc = 0;		cib_have_quorum = ccm_have_quorum(event);		if(cib_have_quorum) { 			crm_xml_add(				the_cib,XML_ATTR_HAVE_QUORUM,XML_BOOLEAN_TRUE);		} else { 			crm_xml_add(				the_cib,XML_ATTR_HAVE_QUORUM,XML_BOOLEAN_FALSE);		}				crm_info("Quorum %s after event=%s (id=%d)", 			 cib_have_quorum?"(re)attained":"lost",			 ccm_event_name(event), instance);				if(ccm_membership == NULL) {			ccm_membership = g_hash_table_new_full(				g_str_hash, g_str_equal,				crm_ghash_clfree, NULL);		}		if(membership != NULL && membership->m_n_in != 0) {			members = membership->m_n_in;			offset = membership->m_in_idx;			for(lpc = 0; lpc < members; lpc++) {				oc_node_t a_node = membership->m_array[lpc+offset];				char *uname = crm_strdup(a_node.node_uname);				crm_info("Added: %s", uname);				g_hash_table_replace(					ccm_membership, uname, uname);				}		}		if(membership != NULL && membership->m_n_out != 0) {			members = membership->m_n_out;			offset = membership->m_out_idx;			for(lpc = 0; lpc < members; lpc++) {				oc_node_t a_node = membership->m_array[lpc+offset];				crm_info("LOST: %s", a_node.node_uname);				g_hash_table_remove(					ccm_membership, a_node.node_uname);				}		}	}		oc_ev_callback_done(cookie);		return;}