pass pend reason back to controller
This commit is contained in:
parent
cd0bca3138
commit
5560ae91da
16 changed files with 349 additions and 123 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "preason.h"
|
||||
#include "utils.h"
|
||||
|
|
@ -149,3 +150,23 @@ int add_job_preason(xce_job_preason_t* reasons, int code, char* host, char* res)
|
|||
|
||||
return rc;
|
||||
}
|
||||
|
||||
xce_pendreason_t *make_pendreason(uint64_t jobid) {
|
||||
xce_pendreason_t *reason = NULL;
|
||||
xce_job_preason_t *preason = NULL;
|
||||
|
||||
preason = (xce_job_preason_t *)calloc(1, sizeof(*preason));
|
||||
reason = (xce_pendreason_t*)calloc(1, sizeof(*reason));
|
||||
|
||||
if ((preason == NULL) || (reason == NULL)) {
|
||||
FREEUP(reason);
|
||||
FREEUP(preason);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
reason->jobid = jobid;
|
||||
reason->reasons = preason;
|
||||
|
||||
return reason;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue