char *xml_text     = NULL;
cibmon_post_notify(const char *event, HA_Message *msg){	int rc = -1;	const char *op       = NULL;	const char *id       = NULL; 	const char *type     = NULL;	crm_data_t *update = NULL;	crm_data_t *output = NULL;	char *xml_text     = NULL;	if(msg == NULL) {		crm_err("NULL update");		return;	}		op       = cl_get_string(msg, F_CIB_OPERATION);	id       = cl_get_string(msg, F_CIB_OBJID);	type     = cl_get_string(msg, F_CIB_OBJTYPE);	update = get_message_xml(msg, F_CIB_UPDATE);	output = get_message_xml(msg, F_CIB_UPDATE_RESULT);	if(output != NULL) {		xml_text = dump_xml_formatted(output);	}		update_depth--;	if(last_notify_pre == FALSE 	   && update_depth > 0	   && intermediate_changes == FALSE) {		crm_trace("Ignoring intermediate update");		return;	}	last_notify_pre = FALSE;	ha_msg_value_int(msg, F_CIB_RC, &rc);		if(update == NULL) {		if(rc == cib_ok) {			crm_verbose("Operation %s (to section=%s) completed",				    op, crm_str(type));			fprintf(msg_cibmon_strm, "[%s] %s (to %s) completed\n",				event, op, crm_str(type));					} else {			crm_warn("Operation %s (to section=%s) FAILED: (%d) %s",				 op, crm_str(type), rc, cib_error2string(rc));			fprintf(msg_cibmon_strm, "[%s] %s (to %s) FAILED: (%d) %s\n",				event, op, crm_str(type), rc, cib_error2string(rc));		}			} else {		if(rc == cib_ok) {			crm_verbose("Completed %s of <%s%s%s>",				    op, type, id?" id=":"", id?id:"");			fprintf(msg_cibmon_strm, "[%s] Operation %s to <%s%s%s> completed.\n",				event, op, crm_str(type), id?" id=":"", id?id:"");					} else {			crm_warn("%s of <%s%s%s> FAILED: (%d) %s", op, type,				 id?" id=":"", id?id:"", rc, cib_error2string(rc));			fprintf(msg_cibmon_strm, "[%s] Operation %s to <%s %s%s> FAILED: (%d) %s\n",				event, op, crm_str(type), id?" id=":"", id?id:"",				rc, cib_error2string(rc));		}	}	fprintf(msg_cibmon_strm, "[%s] Operation %s result:\n%s\n",		event, op, crm_str(xml_text));	crm_free(xml_text);	crm_xml_verbose(output, "Resulting fragment");	fflush(msg_cibmon_strm);}