crm_log_message_adv(log_level, DEVEL_DIR"/outbound.log", msg);
crm_log_message_adv(log_level, "outbound.log", msg);
send_msg_via_ha(ll_cluster_t *hb_fd, HA_Message *msg){	int log_level        = LOG_DEBUG;	int send_result      = HA_OK;	gboolean broadcast   = FALSE;	gboolean all_is_good = TRUE;	const char *op       = cl_get_string(msg, F_CRM_TASK);	const char *sys_to   = cl_get_string(msg, F_CRM_SYS_TO);	const char *host_to  = cl_get_string(msg, F_CRM_HOST_TO);	if (msg == NULL) {		crm_err("Attempt to send NULL Message via HA failed.");		all_is_good = FALSE;	} else {		crm_trace("Relaying message to (%s) via HA", host_to); 	}		if (all_is_good) {		if (sys_to == NULL || strlen(sys_to) == 0) {			crm_err("You did not specify a destination sub-system"				" for this message.");			all_is_good = FALSE;		}	}	/* There are a number of messages may not need to be ordered.	 * At a later point perhaps we should detect them and send them	 *  as unordered messages.	 */	if (all_is_good) {		if (host_to == NULL		    || strlen(host_to) == 0		    || safe_str_eq(sys_to, CRM_SYSTEM_DC)) {			broadcast = TRUE;			send_result=hb_fd->llc_ops->sendclustermsg(hb_fd, msg);		} else {			send_result = hb_fd->llc_ops->send_ordered_nodemsg(				hb_fd, msg, host_to);		}				if(send_result != HA_OK)			all_is_good = FALSE;	}		if(all_is_good == FALSE) {		log_level = LOG_ERR;	}	if(log_level == LOG_ERR	   || (safe_str_neq(op, CRM_OP_HBEAT))) {		do_crm_log(log_level, __FUNCTION__, NULL,			   "Sending %sHA message (ref=%s) to %s@%s %s.",			   broadcast?"broadcast ":"directed ",			   cl_get_string(msg, XML_ATTR_REFERENCE),			   crm_str(sys_to), host_to==NULL?"<all>":host_to,			   all_is_good?"succeeded":"failed");	}	#ifdef MSG_LOG	crm_log_message_adv(log_level, DEVEL_DIR"/outbound.log", msg);#endif	crm_msg_del(msg);		return all_is_good;}