scanf("%c",&a);
if (a != 'y' && a != 'Y') return 1;
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
if (edg_wlc_JobIdParse(argv[1],&job)) {
fprintf(stderr,"%s: can't parse job ID\n",argv[1]);
break;
}
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
if (edg_wlc_JobIdParse(argv[optind], &jobid)) {
fprintf(stderr,"can't parse job ID\n");
edg_wlc_JobId jobid,*subjobs;
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
+
opterr = 0;
do {
edg_wll_QueryRec cond[3],jcond[2]; /* [2] is terminator */
edg_wll_Event *events = NULL;
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
if (argc != 3) usage(argv[0]);
time_t valid = 0;
struct timeval timeout;
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
/* parse options, reflect them in the LB context */
while ((o = getopt(argc,argv,"s:")) >= 0) switch (o) {
int err;
char *et,*ed;
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
edg_wlc_JobIdParse("https://fake.server/fakejob",&job);
if ((err = edg_wll_SetLoggingJobProxy(ctx,job,NULL,"some user",0))) edg_wll_Error(ctx,&et,&ed);
if (argc < 2)
help(argv[0]);
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
while ((opt=getopt(argc,argv,"r:d:xX:")) != -1)
switch (opt) {
edg_wlc_JobId jobid,*subjobs;
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
+
opterr = 0;
do {
if ( (errno = edg_wlc_JobIdParse(jobid_s, &jobid)) ) { perror(jobid_s); return 1; }
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
if ( !user ) {
/*
for ( i = 1; i <= no_of_runs; i++ ) {
printf ("Proxy file No. %d: %s\n",i,argv[i]);
- edg_wll_InitContext(&p_ctx[i-1]);
+ if (edg_wll_InitContext(&p_ctx[i-1]) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
if (strcmp(argv[i],"default")) edg_wll_SetParam(p_ctx[i-1], EDG_WLL_PARAM_X509_PROXY, argv[i]);
if (user_jobs(p_ctx[i-1],&jobs[i-1],&states[i-1])) goto err;
edg_wll_LogLine (*unparse)(edg_wll_Context context,edg_wll_Event *event);
const char *parse_str,*unparse_str;
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
+
opterr = 0;
me = strdup(argv[0]);
if ( (errno = edg_wlc_JobIdParse(jobid_s, &jobid)) ) { perror(jobid_s); return 1; }
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
edg_wll_SetParam(ctx, EDG_WLL_PARAM_SOURCE, EDG_WLL_SOURCE_USER_INTERFACE);
edg_wll_SetParam(ctx, EDG_WLL_PARAM_LBPROXY_SERVE_SOCK, server);
char **groups;
int i;
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
if (argc < 3) {
fprintf(stderr,"usage: %s CE state_from state_to\n",argv[0]);
int i;
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
if (!strcmp(argv[1],"-n")) {
era = atoi(argv[2]);
while (!stop) {
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
edg_wll_SetParam(ctx, EDG_WLL_PARAM_SOURCE, EDG_WLL_SOURCE_WORKLOAD_MANAGER);
if (edg_wll_SetLoggingJobProxy(ctx,job,NULL,"/I/am/the/user",EDG_WLL_SEQ_NORMAL) && !stop) {
edg_wlc_JobId jobid,*subjobs;
FILE *f;
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
opterr = 0;
edg_wll_JobStat stat;
time_t valid = 0;
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
memset(&chj,0,sizeof chj);
chj[0].op = EDG_WLL_QUERY_OP_CHANGED;
break;
}
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
if ( user_jobs == edg_wll_UserJobsProxy && owner )
edg_wll_SetParam(ctx, EDG_WLL_PARAM_LBPROXY_USER, owner);
user_jobs = edg_wll_UserJobsProxy;
}
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ pthread_exit(NULL);
+ }
if ( user_jobs == edg_wll_UserJobsProxy && arguments->owner )
edg_wll_SetParam(ctx, EDG_WLL_PARAM_LBPROXY_USER, arguments->owner);
struct timeval start, stop;
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
+
opterr = 0;
do {
struct timeval log_timeout = { tv_sec: 2, tv_usec: 0 };
- edg_wll_InitContext(&ctx);
+ if (edg_wll_InitContext(&ctx) != 0) {
+ fprintf(stderr, "Couldn't create L&B context.\n");
+ return 1;
+ }
opterr = 0;