{
int i;
- for (i=0; (*attr_tables && *attr_tables[i]); i++) {
- if (!strcmp(*attr_tables[i], new)) return;
+ for (i=0; (*attr_tables && (*attr_tables)[i]); i++) {
+ if (!strcmp((*attr_tables)[i], new)) return;
}
*attr_tables = realloc((*attr_tables), (i+2) * sizeof(**attr_tables));
- *attr_tables[i] = strdup(new);
- *attr_tables[i+1] = NULL;
+ (*attr_tables)[i] = strdup(new);
+ (*attr_tables)[i+1] = NULL;
}
/* transform soap enum queryOp to mysql quivalent */
trio_asprintf(&qb,"%s, %s", qa, attr_tables[i]);
free(qa); qa = qb; qb = NULL;
}
-// XXX : memory destroyed somewhere (add_attr_table commented out too :(
- trio_asprintf(&query, "SELECT dg_jobid FROM jobs%s WHERE %s;", qa, qwhere);
-//trio_asprintf(&query, "SELECT dg_jobid FROM jobs%s WHERE %s;", ",attr_d5189de027922f81005951e6efe0efd5", qwhere);
+
+ trio_asprintf(&query, "SELECT dg_jobid,ps FROM jobs%s WHERE %s;", qa, qwhere);
free(qwhere);
free(qa);
}
if ( ret < 0 ) goto err;
+
glite_jp_db_freestmt(&stmt);
*jobids = jids;