xmlSetProp(xml_node, XML_ATTR_ID,          id); xmlSetProp(xml_node, XML_CIB_ATTR_RESID,       res_id); xmlSetProp(xml_node, XML_CIB_ATTR_INSTANCE,    instance); xmlSetProp(xml_node, XML_CIB_ATTR_MAXINSTANCE, instance); xmlSetProp(xml_node, XML_CIB_ATTR_NODEID,      node_id); xmlSetProp(xml_node, XML_CIB_ATTR_RESSTATUS,   CIB_VAL_RESSTATUS_DEFAULT); xmlSetProp(xml_node, XML_CIB_ATTR_SOURCE,      "none"); xmlSetProp(xml_node, XML_ATTR_TSTAMP,      getNow());
set_xml_property_copy(xml_node, XML_ATTR_ID,          id); set_xml_property_copy(xml_node, XML_CIB_ATTR_RESID,       res_id); set_xml_property_copy(xml_node, XML_CIB_ATTR_INSTANCE,    instance); set_xml_property_copy(xml_node, XML_CIB_ATTR_MAXINSTANCE, instance); set_xml_property_copy(xml_node, XML_CIB_ATTR_NODEID,      node_id); set_xml_property_copy(xml_node, XML_CIB_ATTR_RESSTATUS,   CIB_VAL_RESSTATUS_DEFAULT); set_xml_property_copy(xml_node, XML_CIB_ATTR_SOURCE,      "none"); set_xml_property_copy(xml_node, XML_ATTR_TSTAMP,      getNow());
newStatus(const char *res_id, const char *node_id, const char *instance){    // verify the node and resource exist?, get max_instances from resource or update later    char *id = (char*)ha_malloc(128*(sizeof(char)));    sprintf(id, "%s-%s", res_id, instance);    CRM_DEBUG2("Creating " XML_CIB_TAG_STATUS " (%s).", id);            xmlNodePtr xml_node = xmlNewNode(NULL, XML_CIB_TAG_STATE); // replace with #define s    xmlSetProp(xml_node, XML_ATTR_ID,          id);    xmlSetProp(xml_node, XML_CIB_ATTR_RESID,       res_id);    xmlSetProp(xml_node, XML_CIB_ATTR_INSTANCE,    instance);    xmlSetProp(xml_node, XML_CIB_ATTR_MAXINSTANCE, instance); // a sensible default... parent can update later if required     xmlSetProp(xml_node, XML_CIB_ATTR_NODEID,      node_id);    xmlSetProp(xml_node, XML_CIB_ATTR_RESSTATUS,   CIB_VAL_RESSTATUS_DEFAULT);    xmlSetProp(xml_node, XML_CIB_ATTR_SOURCE,      "none");    xmlSetProp(xml_node, XML_ATTR_TSTAMP,      getNow());//    xmlNodePtr xml_node = xmlStringLenGetNodeList(cib, c_object, 1);        FNRET(xml_node);}