support for possible destinations and ce_nodes
authorMiloš Mulač <mulac@civ.zcu.cz>
Fri, 3 Jun 2005 14:48:18 +0000 (14:48 +0000)
committerMiloš Mulač <mulac@civ.zcu.cz>
Fri, 3 Jun 2005 14:48:18 +0000 (14:48 +0000)
- slightly tested (seems to work at first glance)

org.glite.lb.server/src/jobstat_supp.c
org.glite.lb.server/src/lb_xml_parse.c.T

index 0c9e34e..f32f638 100644 (file)
@@ -354,6 +354,8 @@ static char *enc_JobStat(char *old, edg_wll_JobStat* stat)
        if (ret) ret = enc_timeval(ret, stat->lastUpdateTime);
        if (ret) ret = enc_int(ret, stat->expectUpdate);
        if (ret) ret = enc_string(ret, stat->expectFrom);
+       if (ret) ret = enc_strlist(ret, stat->possible_destinations);
+       if (ret) ret = enc_strlist(ret, stat->possible_ce_nodes);
 
        return ret;
 }
@@ -399,6 +401,10 @@ static edg_wll_JobStat* dec_JobStat(char *in, char **rest)
         if (tmp_in != NULL) stat->lastUpdateTime = dec_timeval(tmp_in, &tmp_in);
         if (tmp_in != NULL) stat->expectUpdate = dec_int(tmp_in, &tmp_in);
         if (tmp_in != NULL) stat->expectFrom = dec_string(tmp_in, &tmp_in);
+        if (tmp_in != NULL) stat->possible_destinations = dec_strlist(tmp_in, &tmp_in);
+        if (tmp_in != NULL) stat->possible_ce_nodes = dec_strlist(tmp_in, &tmp_in);
+
+
        
        *rest = tmp_in;
        return stat;
index 6732a04..6a13b2b 100644 (file)
@@ -1625,6 +1625,8 @@ int edg_wll_JobStatusToXML(edg_wll_Context ctx, edg_wll_JobStat stat, char **mes
                 gen "edg_wll_add_$ft\_to_XMLBody(&pomB, stat.$_, \"$_\", $n);\n";
         }
 @@@}
+       if (stat.possible_destinations) edg_wll_add_strlist_to_XMLBody(&pomB, stat.possible_destinations, "possible_destinations", "name", "\t\t\t", NULL);
+       if (stat.possible_ce_nodes) edg_wll_add_strlist_to_XMLBody(&pomB, stat.possible_ce_nodes, "possible_ce_nodes", "name", "\t\t\t", NULL);
        if (stat.children) edg_wll_add_strlist_to_XMLBody(&pomB, stat.children, "children", "jobId", "\t\t\t", NULL);
        if (stat.children_hist) edg_wll_add_intlist_to_XMLBody(&pomB, stat.children_hist, "children_hist", edg_wll_StatToString, "\t\t\t", 1, stat.children_hist[0]);
        if (stat.children_states) edg_wll_add_stslist_to_XMLBody(ctx, &pomB, stat.children_states, "children_states", "", EDG_WLL_JOB_UNDEF);