xmlNodePtr root_xml_node = validate_and_decode_ipcmessage(msg, FALSE);
xmlNodePtr root_xml_node = find_xml_in_ipcmessage(msg, FALSE);
crmd_ipc_input_callback(IPC_Channel *client, gpointer user_data){    FNIN();    int lpc = 0;    IPC_Message *msg = NULL;    gboolean hack_return_good = TRUE;    crmd_client_t *curr_client = (crmd_client_t*)user_data;    CRM_DEBUG2("channel: %p", client);    CRM_DEBUG2("crmd_ipc_input_callback: processing IPC message from %s", curr_client->table_key);    CRM_DEBUG2("Client is %s", client == NULL?"NULL":"valid");    CRM_DEBUG3("Client status %d (disconnect=%d)", client->ch_status, IPC_DISCONNECT);    while(client->ch_status != IPC_DISCONNECT && client->ops->is_message_pending(client) == TRUE)    {	if(client->ops->recv(client, &msg) != IPC_OK)	{	    perror("Receive failure:");	    FNRET(!hack_return_good);	}		if(msg == NULL)	{	    CRM_DEBUG("No message this time");	    continue;	}	lpc++;	char *buffer = (char*)msg->msg_body;	CRM_DEBUG2("Got xml [text=%s]", buffer);		CRM_DEBUG("crmd_ipc_input_dispatch: validating and decoding");	xmlNodePtr root_xml_node = validate_and_decode_ipcmessage(msg, FALSE);	if(root_xml_node != NULL)	{	    if(crmd_authorize_message(root_xml_node, msg, curr_client))	    {		CRM_DEBUG("crmd_ipc_input_dispatch: Message authorized, about to relay");		process_message(root_xml_node, TRUE, NULL);	    }	    else		CRM_DEBUG("crmd_ipc_input_dispatch: Message not authorized");	}	else	{	    cl_log(LOG_INFO, "IPC Message was not valid... discarding message.");	}	msg->msg_done(msg);    }    CRM_DEBUG2("Processed %d messages", lpc);        CRM_DEBUG2("Client status %d", client->ch_status);    if(client->ch_status == IPC_DISCONNECT)    {	cl_log(LOG_INFO, "crmd_ipc_input_callback: received HUP from %s", curr_client->table_key);	if(curr_client != NULL)	{	    CRM_DEBUG("###-###-### Removing client from hash table");	    if(curr_client->table_key != NULL)		g_hash_table_remove(ipc_clients, curr_client->table_key);	    	    if(curr_client->sub_sys == NULL) CRM_DEBUG("Client had not registered with us yet");	    else if(strcmp(CRM_SYSTEM_LRMD, curr_client->sub_sys) == 0) have_lrmd = FALSE;	    else if(strcmp(CRM_SYSTEM_PENGINE, curr_client->sub_sys) == 0) have_te = FALSE;	    else if(strcmp(CRM_SYSTEM_TENGINE, curr_client->sub_sys) == 0) have_pe = FALSE;	    CRM_DEBUG("###-###-### Detaching crm_client");	    gboolean det = G_main_del_IPC_Channel(curr_client->client_source);	    CRM_DEBUG2("crm_client was %s detached", det?"successfully":"not");	    	    CRM_DEBUG("###-###-### Freeing crm_client");	    ha_free(curr_client);	}/* 	CRM_DEBUG("checking if more messages need to be gotten"); *//* 	if(client != NULL && client->ops->is_message_pending(client) == TRUE) *//* 	{ *//* 	    IPC_Message *msg = get_ipc_message(client); *//* 	    msg->msg_done(msg); *//* 	} *//* 	CRM_DEBUG("no more messages need to be gotten"); */		// else nothign to do, they never registered	     	CRM_DEBUG("this client is now gone.");	FNRET(!hack_return_good); // definitly required    }    	     CRM_DEBUG("crmd_ipc_input_callback: done");    FNRET(hack_return_good); /* TOBEDONE */}