git://scientific.zcu.cz
/
jra1mw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7428e4f
)
Fix UserJobs via "GET /"
author
Aleš Křenek
<ljocha@ics.muni.cz>
Thu, 14 Feb 2008 11:28:51 +0000
(11:28 +0000)
committer
Aleš Křenek
<ljocha@ics.muni.cz>
Thu, 14 Feb 2008 11:28:51 +0000
(11:28 +0000)
org.glite.lb.server/src/userjobs.c
patch
|
blob
|
blame
|
history
diff --git
a/org.glite.lb.server/src/userjobs.c
b/org.glite.lb.server/src/userjobs.c
index
2566c73
..
2cfc045
100644
(file)
--- a/
org.glite.lb.server/src/userjobs.c
+++ b/
org.glite.lb.server/src/userjobs.c
@@
-70,13
+70,15
@@
int edg_wll_UserJobs(
free(res); res = NULL;
}
- *states = calloc(njobs, sizeof(**states));
+
if (states)
*states = calloc(njobs, sizeof(**states));
for (i = 0; i < njobs; i++) {
- if (edg_wll_JobStatus(ctx, out[i], -1, &(*states)[i]) != 0) {
+ edg_wll_JobStat *stat = states ? &(*states)[i] : NULL;
+
+ if (stat && edg_wll_JobStatus(ctx, out[i], -1, stat) != 0) {
for (j = 0; j < i; j++) edg_wll_FreeStatus(&(*states)[j]);
*states = NULL;
- break;
}
+ break;
}
err:
free(res);