type   = cl_get_string(new_input->msg, F_CRM_MSG_TYPE);
task   = cl_get_string(new_input->msg, F_CRM_TASK);
subsystem_msg_dispatch(IPC_Channel *sender, void *user_data){	int lpc = 0;	IPC_Message *msg = NULL;	ha_msg_input_t *new_input = NULL;	gboolean all_is_well = TRUE;	const char *sys_to;	const char *type;	while(sender->ops->is_message_pending(sender)) {		gboolean process = FALSE;		if (sender->ch_status == IPC_DISCONNECT) {			/* The message which was pending for us is that			 * the IPC status is now IPC_DISCONNECT */			break;		}		if (sender->ops->recv(sender, &msg) != IPC_OK) {			perror("Receive failure:");			return !all_is_well;		}		if (msg == NULL) {			crm_err("No message this time");			continue;		}		lpc++;		new_input = new_ipc_msg_input(msg);		msg->msg_done(msg);		crm_log_message(LOG_MSG, new_input->msg);		sys_to = cl_get_string(new_input->msg, F_CRM_SYS_TO);		type   = cl_get_string(new_input->msg, F_CRM_MSG_TYPE);		if(safe_str_eq(type, CRM_OP_HELLO)) {			process = TRUE;		} else if(sys_to == NULL) {			crm_err("Value of %s was NULL!!", F_CRM_SYS_TO);					} else if(type == NULL) {			crm_err("Value of %s was NULL!!", F_CRM_MSG_TYPE);					} else {			process = TRUE;		}		if(process){			gboolean (*process_function)				(HA_Message *msg, crm_data_t *data, IPC_Channel *sender) = NULL;			process_function = user_data;#ifdef MSG_LOG			crm_log_message_adv(				LOG_DEBUG, DEVEL_DIR"/inbound.client.log", new_input->msg);#endif			if(FALSE == process_function(				   new_input->msg, new_input->xml, sender)) {				crm_warn("Received a message destined for %s"					 " by mistake", sys_to);			}		} else {#ifdef MSG_LOG			crm_log_message_adv(				LOG_ERR, DEVEL_DIR"/inbound.client.log", new_input->msg);#endif		}				delete_ha_msg_input(new_input);		msg = NULL;	}	/* clean up after a break */	if(msg != NULL)		msg->msg_done(msg);	crm_verbose("Processed %d messages", lpc);	if (sender->ch_status == IPC_DISCONNECT) {		crm_err("The server has left us: Shutting down...NOW");		exit(1); /* shutdown properly later */				return !all_is_well;	}	return all_is_well;}