op, typeornull);
op, crm_str(type));
cib_post_notify(	const char *op, crm_data_t *update, enum cib_errors result, crm_data_t *new_obj) {	HA_Message *update_msg = ha_msg_new(8);	char *type = NULL;	char *id = NULL;	if(update != NULL && crm_element_value(new_obj, XML_ATTR_ID) != NULL){		id = crm_element_value_copy(new_obj, XML_ATTR_ID);	}		ha_msg_add(update_msg, F_TYPE, T_CIB_NOTIFY);	ha_msg_add(update_msg, F_SUBTYPE, T_CIB_POST_NOTIFY);	ha_msg_add(update_msg, F_CIB_OPERATION, op);	ha_msg_add_int(update_msg, F_CIB_RC, result);		if(id != NULL) {		ha_msg_add(update_msg, F_CIB_OBJID, id);	}	crm_debug("beekhof");	if(update != NULL) {		crm_trace("Setting type to update->name: %s",			    crm_element_name(update));		ha_msg_add(update_msg, F_CIB_OBJTYPE, crm_element_name(update));		type = crm_strdup(crm_element_name(update));	} else if(new_obj != NULL) {		crm_trace("Setting type to new_obj->name: %s",			    crm_element_name(new_obj));		ha_msg_add(update_msg, F_CIB_OBJTYPE, crm_element_name(new_obj));		type = crm_strdup(crm_element_name(new_obj));			} else {		crm_trace("Not Setting type");	}		if(update != NULL) {		add_message_xml(update_msg, F_CIB_UPDATE, update);	} else if(new_obj != NULL) {		add_message_xml(update_msg, F_CIB_UPDATE_RESULT, new_obj);	}	crm_debug("Notifying clients");	g_hash_table_foreach(client_list, cib_notify_client, update_msg);		pending_updates--;	if(pending_updates == 0) {		ha_msg_mod(update_msg, F_SUBTYPE, T_CIB_UPDATE_CONFIRM);		crm_debug("Sending confirmation to clients");		g_hash_table_foreach(client_list, cib_notify_client, update_msg);	}	if(update == NULL) {		const char * typeornull = type ? type : "<null>";		if(result == cib_ok) {			crm_verbose("Operation %s (on section=%s) completed",				    op, typeornull);					} else {			crm_warn("Operation %s (on section=%s) FAILED: (%d) %s",				 op, typeornull, result, cib_error2string(result));		}			} else {		if(result == cib_ok) {			crm_verbose("Completed %s of <%s %s%s>",				    op, type, id?"id=":"", id?id:"");					} else {			crm_warn("%s of <%s %s%s> FAILED: %s", op, type,				 id?"id=":"", id?id:"", cib_error2string(result));		}	}	crm_free(id);	crm_free(type);	crm_msg_del(update_msg);	crm_debug("Notify complete");}