From 2e3b0743d77fee0c1f72460ab90eba01a811c6f3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Mon, 7 Jun 2010 11:59:03 +0000 Subject: [PATCH] Extract notif server address from JobID if not set in environment. --- org.glite.lb.client/src/notify.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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; -- 1.8.2.3