const char *sys_from   = xmlGetProp(root_xml_node, XML_MSG_ATTR_SYSFROM);
gpointer table_key = NULL;  FNIN();
crmd_authorize_message(xmlNodePtr root_xml_node, IPC_Message *client_msg, crmd_client_t *curr_client){    FNIN();    // check the best case first    const char *sys_from   = xmlGetProp(root_xml_node, XML_MSG_ATTR_SYSFROM);    if (sys_from != NULL)    {	gboolean can_reply = FALSE; // no-one has registered with this id	if (g_hash_table_lookup (ipc_clients, sys_from) != NULL)	    can_reply = TRUE;  // reply can be routed	CRM_DEBUG2("Message reply would%s be able to be routed.",can_reply?"":" not");	FNRET(can_reply);    }    // otherwise, check if it was a hello message    cl_log(LOG_INFO, "recieved client join msg: %s", (char*)client_msg->msg_body);    char *uid = NULL;    char *client_name = NULL;    char *major_version = NULL;    char *minor_version = NULL;    gboolean result = process_hello_message(client_msg, &uid, &client_name, &major_version, &minor_version);    if (result == TRUE)    {	// check version	int mav = atoi(major_version);	int miv = atoi(minor_version);	if (mav < 0 || miv < 0)	{	    cl_log(LOG_ERR, "Client version (%d:%d) is not acceptable", mav, miv);	    result = FALSE;	}    }    gpointer table_key = (gpointer)ha_strdup(client_name);    if (result == TRUE)    {        /* if we already have one of those clients	 * only applies to lrm, crm etc.  not admin clients	 */	if (strcmp(CRM_SYSTEM_LRMD, client_name) == 0)	{	    result = !have_lrmd;	    have_lrmd = TRUE;	}	else if (strcmp(CRM_SYSTEM_PENGINE, client_name) == 0)	{	    result = !have_te;	    have_te = TRUE;	}	else if (strcmp(CRM_SYSTEM_TENGINE, client_name) == 0)	{	    result = !have_te;	    have_pe = TRUE;	}	else	    table_key = (gpointer)generate_hash_key(client_name, uid);    }       if (result == TRUE)    {	CRM_DEBUG2("Accepted client %s", (char*)table_key);	curr_client->table_key = table_key;	curr_client->sub_sys = ha_strdup(client_name);	curr_client->uid = ha_strdup(uid);		g_hash_table_insert (ipc_clients, table_key, curr_client->client_channel);    }    else	CRM_DEBUG("Rejected client logon request");        FNRET(result);}