From: Zdeněk Šustr Date: Mon, 7 Jun 2010 11:59:03 +0000 (+0000) Subject: Extract notif server address from JobID if not set in environment. X-Git-Tag: glite-jobid-api-c_R_1_0_4_1~16 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=2e3b0743d77fee0c1f72460ab90eba01a811c6f3;p=jra1mw.git Extract notif server address from JobID if not set in environment. --- diff --git a/org.glite.lb.client/src/notify.c b/org.glite.lb.client/src/notify.c index fb4b8e9..0d1856a 100644 --- a/org.glite.lb.client/src/notify.c +++ b/org.glite.lb.client/src/notify.c @@ -130,9 +130,10 @@ int main(int argc,char **argv) {"state", required_argument, 0, 'S'}, {0, 0, 0, 0}}; int option_index = 0; - char *single, *statelist; + char *single, *statelist, *notif_server; edg_wll_JobStatCode single_code; int statno, stdelims, sti; + unsigned int notif_server_port; #define MAX_NEW_CONDS 7 conditions = (edg_wll_QueryRec **)calloc(MAX_NEW_CONDS + 1,sizeof(edg_wll_QueryRec *)); @@ -150,6 +151,13 @@ int main(int argc,char **argv) } conditions[i][0].value.j = jid; i++; + edg_wll_GetParam(ctx, EDG_WLL_PARAM_NOTIF_SERVER, ¬if_server); + if (!notif_server) { + glite_jobid_getServerParts(jid, ¬if_server, ¬if_server_port); + edg_wll_SetParam(ctx, EDG_WLL_PARAM_NOTIF_SERVER, notif_server); + edg_wll_SetParamInt(ctx, EDG_WLL_PARAM_NOTIF_SERVER_PORT, notif_server_port); + } + free(notif_server); break; case 'o': if (excl) { usage("new"); return EX_USAGE; } else excl = 1;