recieved_responses);
received_responses);
admin_msg_callback(IPC_Channel * server, void *private_data){	FNIN();	int lpc = 0;	IPC_Message *msg = NULL;	gboolean hack_return_good = TRUE;	static int recieved_responses = 0;	while (server->ch_status != IPC_DISCONNECT	       && server->ops->is_message_pending(server) == TRUE) {		if (server->ops->recv(server, &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 xml_root_node =			find_xml_in_ipcmessage(msg, TRUE);		if (xml_root_node == NULL) {			cl_log(LOG_INFO, "IPC message was not valid... discarding.");			continue;		}		if (validate_crm_message(xml_root_node,					 crm_system_name,					 adminuid,					 "response") == FALSE) {			cl_log(LOG_INFO,			       "CRM message was not valid... discarding.");			continue;		}		if (strcmp("response",			   xmlGetProp(xml_root_node, XML_ATTR_MSGTYPE)) != 0) {			cl_log(LOG_ERR,			       "The admin client does not accept requests");			continue;		}		recieved_responses++;		CRM_DEBUG2("upated counter to %d", recieved_responses);		// do stuff		if (this_msg_reference != NULL) {			// in testing mode...			char *filename;			/* 31 = "test-_.xml" + an_int_as_string + '\0' */			int filename_len = 31 + strlen(this_msg_reference);			filename = ha_malloc(sizeof(char) * filename_len);			sprintf(filename, "test-%s_%d.xml", this_msg_reference,				recieved_responses);			filename[filename_len - 1] = '\0';			if (xmlSaveFormatFile(filename, xml_root_node->doc, 1) < 0) {				cl_log(LOG_CRIT,				       "Couuld not save response to file test-%s_%d.xml",				       this_msg_reference,				       recieved_responses);			}		}	}	if (server->ch_status == IPC_DISCONNECT) {		cl_log(LOG_INFO, "admin_msg_callback: received HUP");		FNRET(!hack_return_good);	}	cl_log(LOG_DEBUG, "admin_msg_callback: processing IPC message");	if (recieved_responses >= expected_responses) {		cl_log(LOG_INFO,		       "Recieved expected number (%d) of messages from Heartbeat."		       "  Exiting normally.", expected_responses);		g_main_quit(mainloop);		return !hack_return_good;	}	FNRET(hack_return_good);}