xmlNodePtr xml_section = findNode(update_command, XML_TAG_CIB); xml_section = findNode(update_command, XML_CIB_TAG_RESOURCES);
xmlNodePtr xml_section = find_xmlnode(update_command, XML_TAG_CIB); xml_section = find_xmlnode(update_command, XML_CIB_TAG_RESOURCES);
actionRequest(xmlNodePtr update_command, const char *operation, xmlNodePtr failed){  xmlNodePtr xml_section = findNode(update_command, XML_TAG_CIB);  xml_section = findNode(update_command, XML_CIB_TAG_RESOURCES);  xmlNodePtr child = xml_section->children;    while(child != NULL)    {      cl_log(LOG_DEBUG, "Performing action %s on (%s=%s).", operation, child->name, ID(child));      int result = 0; // change to -1 post-prototype      const char *old_state = NULL;  // get this from internal lists      const char *new_state = old_state;      // set timers etc.      if(strcmp("stop", op) == 0)      {	  // result = try to stop the resource	  if(result == 0)	  {	      new_state = CIB_VAL_RESSTATUS_STOPED;	      // update internal lists	  }	  // may want to put into a particular state depending on result code      }      else if(strcmp("start", op) == 0)      {	  // result = try to stop the resource	  if(result == 0)	  {	      new_state = CIB_VAL_RESSTATUS_STARTED;	      // update internal lists	  }	  // may want to put into a particular state depending on result code      }      /* failures here will be like:       *  - resource script not found       *  - already started/stopped       *  - operation not supported       *       * other failures will be reported by timer callbacks or something       */      conditional_add_failure(failed, child, operation, new_state, result);      child = child->next;    }}