crm_msg_reference = xmlGetProp(original_request, XML_MSG_ATTR_REFERENCE); 
crm_msg_reference = xmlGetProp(original_request, XML_MSG_ATTR_REFERENCE); 
create_forward(xmlNodePtr original_request,			   xmlNodePtr xml_response_data,			   const char *sys_to){	const char *message_type = XML_MSG_TAG_REQUEST;	const char *crm_msg_reference = NULL;	const char *host_from = NULL;	const char *host_to   = NULL;	const char *sys_from  = NULL;	const char *type      = NULL;		FNIN();	crm_msg_reference = xmlGetProp(original_request, XML_MSG_ATTR_REFERENCE);	host_from = xmlGetProp(original_request, XML_MSG_ATTR_HOSTFROM);	host_to   = xmlGetProp(original_request, XML_MSG_ATTR_HOSTTO);	sys_from  = xmlGetProp(original_request, XML_MSG_ATTR_SYSFROM);	type      = xmlGetProp(original_request, XML_MSG_ATTR_MSGTYPE);		if (type == NULL)	{		cl_log(LOG_ERR,			   "Cannot create reply, no message type in original message");		FNRET(NULL);	}	else if (strcmp(XML_MSG_TAG_REQUEST, type) != 0)	{		cl_log(LOG_ERR,			   "Cannot create reply, original message was not a request");		FNRET(NULL);	}#if 0	CRM_DEBUG("creating forward from...");	CRM_DEBUG2("\t%s", crm_msg_reference);	CRM_DEBUG2("\t%s", host_from);	CRM_DEBUG2("\t%s", host_to);	CRM_DEBUG2("\t%s", sys_from);	CRM_DEBUG2("\t%s", sys_to);	CRM_DEBUG2("\t%s", type);#endif	xmlDocPtr doc = xmlNewDoc("1.0");	doc->children = create_xml_doc_node(doc, XML_MSG_TAG);	// the root_xml_node node	set_xml_property_copy(doc->children, XML_ATTR_VERSION,     CRM_VERSION);	set_xml_property_copy(doc->children, XML_MSG_ATTR_MSGTYPE, message_type);	set_xml_property_copy(doc->children, XML_ATTR_TSTAMP,      getNow());    	// HOSTTO will be ignored if it is to the DC anyway.	set_xml_property_copy(doc->children, XML_MSG_ATTR_HOSTTO,   host_to);	set_xml_property_copy(doc->children, XML_MSG_ATTR_HOSTFROM, host_from);	set_xml_property_copy(doc->children, XML_MSG_ATTR_SYSTO,    sys_to);	set_xml_property_copy(doc->children, XML_MSG_ATTR_SYSFROM,  sys_from);	set_xml_property_copy(doc->children, XML_MSG_ATTR_REFERENCE,						  crm_msg_reference);    	// create a place holder for the eventual data	xmlNodePtr xml_node   = create_xml_node(doc->children, message_type);	CRM_DEBUG("Created forward wrapper...");	xml_message_debug(xmlDocGetRootElement(doc));    	if (xml_response_data != NULL) {		unlink_xml_node(xml_response_data);		xmlAddChild(xml_node, xml_response_data);	}    	FNRET(xmlDocGetRootElement(doc));}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/1527bd277bea88314ec7c1fafa964969da82ef38/msgutils.c/buggy/crm/common/msgutils.c