if(ipc_client->should_send_blocking == FALSE) { crm_info("Setting IPC Channel to blocking..." " least some messages get lost"); ipc_client->should_send_blocking = TRUE; }  if(all_is_good && msg2ipcchan(msg, ipc_client) != HA_OK) { crm_err("Could not send IPC, message"); all_is_good = FALSE;  if(ipc_client->ch_status != IPC_CONNECT) { crm_err("IPC Channel is no longer connected"); }  }  cl_log_message(all_is_good?LOG_DEBUG:LOG_ERR, msg);  do_crm_log(log_level, __FUNCTION__, "Sending IPC message (ref=%s) to %s@%s %s.", cl_get_string(msg, XML_ATTR_REFERENCE), cl_get_string(msg, F_CRM_SYS_TO), cl_get_string(msg, F_CRM_HOST_TO), all_is_good?"succeeded":"failed");  ha_msg_del(msg);
send_ipc_message(IPC_Channel *ipc_client, IPC_Message *msg){	int lpc = 0;	gboolean all_is_good = TRUE;	if (msg == NULL) {		crm_err("cant send NULL message");		all_is_good = FALSE;	} else if (msg->msg_len <= 0) {		crm_err("cant send 0 sized message");		all_is_good = FALSE;	} else if (msg->msg_len > MAXDATASIZE) {		crm_err("cant send msg... too big");		all_is_good = FALSE;	}		crm_trace("Sending message: %s", crm_str(msg?msg->msg_body:NULL)); 	crm_verbose("Message is%s valid to send", all_is_good?"":" not");	if (ipc_client == NULL) {		all_is_good = FALSE;	}	crm_verbose("IPC Client is%s set.", all_is_good?"":" not");	if (all_is_good) {				while(lpc++ < MAX_IPC_FAIL		      && ipc_client->ops->send(ipc_client, msg) == IPC_FAIL)		{			crm_err("ipc channel blocked");			cl_shortsleep();		}	}		if (lpc == MAX_IPC_FAIL) {		crm_err("Could not send IPC, message.  Channel is dead.");		all_is_good = FALSE;	}	return all_is_good;}