assert(hist[0] == EDG_WLL_NUMBER_OF_STATCODES);
- asprintf(&s, "%s=%d", edg_wll_StatToString(i), hist[1]);
+ asprintf(&s, "%s=%d", edg_wll_StatToString(1), hist[1]);
for (i=1; i<hist[0] ; i++) {
- asprintf(&s1, "%s, %s=%d", s, edg_wll_StatToString(i), hist[i+1]);
+ asprintf(&s1, "%s, %s=%d", s, edg_wll_StatToString(i), hist[i]);
free(s); s=s1; s1=NULL;
}
event->collectionState.state = EDG_WLL_JOB_RUNNING;
event->collectionState.histogram = hist_to_string(pis->pub.children_hist);
- event->collectionState.child = cis->pub.jobId;
+ edg_wlc_JobIdDup(cis->pub.jobId, &(event->collectionState.child));
event->collectionState.child_event = edg_wll_EventToString(ce->any.type);
trans_db_store(ctx, NULL, event);
edg_wll_JobStat *stat_out)
{
intJobStat *ijsp;
- int intErr = 0;
int flags = 0;
int res;
int be_strict = 0;
memset(&oldstat,0,sizeof oldstat);
- if (seq != 0) {
- intErr = edg_wll_LoadIntState(ctx, job, seq - 1, &ijsp);
- }
- if (seq != 0 && !intErr) {
+
+ if (!edg_wll_LoadIntState(ctx, job, seq - 1, &ijsp)) {
edg_wll_CpyStatus(&ijsp->pub,&oldstat);
if (ctx->rgma_export) oldstat_rgmaline = write2rgma_statline(&ijsp->pub);
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);
if (tmp_in != NULL) {
- stat->children_hist = (int*)calloc(EDG_WLL_NUMBER_OF_STATCODES, sizeof(int));
+ stat->children_hist = (int*)calloc(EDG_WLL_NUMBER_OF_STATCODES+1, sizeof(int));
dec_int_array(tmp_in, &tmp_in, stat->children_hist); }
*rest = tmp_in;