if(xmlGetProp(xml_action, "rsc_id") != NULL) {
if(xmlGetProp(xml_action, XML_LRM_ATTR_RSCID) != NULL) {
do_update_cib(xmlNodePtr xml_action, int status){	const char *task   = xmlGetProp(xml_action, XML_LRM_ATTR_TASK);	const char *target = xmlGetProp(xml_action, XML_LRM_ATTR_TARGET);	const char *rsc_id = xmlGetProp(xml_action, "rsc_id");	if(status == LRM_OP_TIMEOUT) {		if(xmlGetProp(xml_action, "rsc_id") != 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);		}	}		print_state();/*  update the CIB<node_state id="hadev">      <lrm>        <lrm_resources>          <lrm_resource id="rsc2" last_op="start" op_code="0" target="hadev"/>*/	char *code;	char since_epoch[64];	xmlNodePtr fragment = NULL;	xmlNodePtr options  = create_xml_node(NULL, XML_TAG_OPTIONS);	xmlNodePtr state    = create_xml_node(NULL, "node_state");	xmlNodePtr rsc      = NULL;	set_xml_property_copy(options, XML_ATTR_OP, CRM_OP_UPDATE);	set_xml_property_copy(state,   XML_ATTR_ID, 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,   "op_code",   code);		set_xml_property_copy(rsc,   "last_op",   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_node(fragment, FALSE));	fflush(msg_te_strm);#endif		send_ipc_request(crm_ch, options, fragment,			 NULL, CRM_SYSTEM_DCIB, CRM_SYSTEM_TENGINE,			 NULL, NULL);		free_xml(fragment);	free_xml(options);	free_xml(state);		return TRUE;}