+ while (cur != NULL) {
+ if (!xmlStrcmp(cur->name, "server_id")) {
+ server_num = atoi(xmlGetProp(cur, "num"));
+ server_name = xmlGetProp(cur, "name");
+ server_uuid = xmlGetProp(cur, "uuid");
+ }
+
+ /* FIXME: Properly handle multiple failover servers */
+ if (!xmlStrcmp(cur->name, "failover_id")) {
+ failover_num = atoi(xmlGetProp(cur, "num"));
+ failover_name = xmlGetProp(cur, "name");
+ failover_uuid = xmlGetProp(cur, "uuid");
+ }
+
+ cur = cur->next;
+ }
+
+ if ((server_name == NULL) || (server_uuid == NULL)) {
+ printf("error: atleast the <server_id> tag is required\n");
+ return -1;
+ }
+