crm_warn("Using status \"pending\" for op \"%s\"" "... this is still in the experimental stage.", task); 
crm_warn("Using status \"pending\" for op \"%s\"..." " this is still in the experimental stage.", crm_str(task)); 
do_update_cib(xmlNodePtr xml_action, int status){	char *code;	char since_epoch[64];	xmlNodePtr fragment = NULL;	xmlNodePtr options  = NULL;	xmlNodePtr state    = NULL;	xmlNodePtr rsc      = NULL;	const char *sys_to = CRM_SYSTEM_DCIB;	const char *task   = xmlGetProp(xml_action, XML_LRM_ATTR_TASK);	const char *rsc_id = xmlGetProp(xml_action, XML_LRM_ATTR_RSCID);	const char *target = xmlGetProp(xml_action, XML_LRM_ATTR_TARGET);	const char *target_uuid =		xmlGetProp(xml_action, XML_LRM_ATTR_TARGET_UUID);		if(status == LRM_OP_TIMEOUT) {		if(xmlGetProp(xml_action, XML_LRM_ATTR_RSCID) != NULL) {			crm_warn("%s: %s %s on %s timed out",				 xml_action->name, task, rsc_id, target);		} else {			crm_warn("%s: %s on %s timed out",				 xml_action->name, task, target);		}	}	/*  update the CIB<node_state id="hadev">      <lrm>        <lrm_resources>          <lrm_resource id="rsc2" last_op="start" op_code="0" target="hadev"/>*/	fragment = NULL;	options  = create_xml_node(NULL, XML_TAG_OPTIONS);	state    = create_xml_node(NULL, XML_CIB_TAG_STATE);#ifdef TESTING	/* turn the "pending" notification into a "op completed" notification	 *  when testing... exercises more code this way.	 */	if(status == -1) {		status = 0;	}	sys_to = CRM_SYSTEM_TENGINE;	set_xml_property_copy(options, XML_ATTR_OP,     CRM_OP_EVENTCC);	set_xml_property_copy(options, XML_ATTR_TRUEOP, CRM_OP_UPDATE);#else	set_xml_property_copy(options, XML_ATTR_OP,    CRM_OP_UPDATE);#endif	set_xml_property_copy(state,   XML_ATTR_UUID,  target_uuid);	set_xml_property_copy(state,   XML_ATTR_UNAME, target);		if(status != -1 && (safe_str_eq(task, "shutdown_crm"))) {		sprintf(since_epoch, "%ld", (unsigned long)time(NULL));		set_xml_property_copy(rsc, "stonith", since_epoch);			} else {		code = crm_itoa(status);				rsc = create_xml_node(state, "lrm");		rsc = create_xml_node(rsc,   "lrm_resources");		rsc = create_xml_node(rsc,   "lrm_resource");				set_xml_property_copy(rsc, XML_ATTR_ID,         rsc_id);		set_xml_property_copy(rsc, XML_LRM_ATTR_TARGET, target);		set_xml_property_copy(			rsc, XML_LRM_ATTR_TARGET_UUID, target_uuid);		if(safe_str_eq(CRMD_RSCSTATE_START, task)) {			set_xml_property_copy(				rsc, XML_LRM_ATTR_RSCSTATE,				CRMD_RSCSTATE_START_PENDING);		} else if(safe_str_eq(CRMD_RSCSTATE_STOP, task)) {			set_xml_property_copy(				rsc, XML_LRM_ATTR_RSCSTATE,				CRMD_RSCSTATE_STOP_PENDING);		} else {			crm_warn("Using status \"pending\" for op \"%s\""				 "... this is still in the experimental stage.",				 task);			set_xml_property_copy(				rsc, XML_LRM_ATTR_RSCSTATE,				CRMD_RSCSTATE_GENERIC_PENDING);		}				set_xml_property_copy(rsc, XML_LRM_ATTR_OPSTATUS, code);		set_xml_property_copy(rsc, XML_LRM_ATTR_RC, code);		set_xml_property_copy(rsc, XML_LRM_ATTR_LASTOP, task);		crm_free(code);	}	fragment = create_cib_fragment(state, NULL);	#ifdef MSG_LOG	fprintf(msg_te_strm,		"[Result ]\tUpdate CIB with \"%s\" (%s): %s %s on %s\n",		status<0?"new action":"timeout",		xml_action->name, task, rsc_id, target);	fprintf(msg_te_strm, "[Sent ]\t%s\n",		dump_xml_formatted(fragment));	fflush(msg_te_strm);#endif		send_ipc_request(crm_ch, options, fragment,			 NULL, sys_to, CRM_SYSTEM_TENGINE,			 NULL, NULL);		free_xml(fragment);	free_xml(options);	free_xml(state);		return TRUE;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/69f8a14658aeeee09c5c270dd118170c371c0ecf/utils.c/buggy/crm/tengine/utils.c