From: František Dvořák Date: Wed, 8 Sep 2010 13:17:58 +0000 (+0000) Subject: dest_url support in notification client. X-Git-Tag: glite-px-glite-PX_R_3_2_0_0~12 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=036f4307271078c0c6d724110dbbddd0b0d02fc0;p=jra1mw.git dest_url support in notification client. --- diff --git a/org.glite.lb.client/src/notification.c b/org.glite.lb.client/src/notification.c index d4d69f4..f243aac 100644 --- a/org.glite.lb.client/src/notification.c +++ b/org.glite.lb.client/src/notification.c @@ -191,7 +191,15 @@ static int get_client_address( hints.ai_socktype = SOCK_STREAM; if (address_override) { - + // complete dest URL ==> pass the URL furhter without listening + if (strstr(address_override, "//")) { + // close the socket if opened + if (ctx->notifSock >= 0) { + close(ctx->notifSock); + ctx->notifSock = -1; + } + } else { + get_name_and_port(address_override, &name, &port); e = getaddrinfo((const char *) name, NULL, &hints, & ai); @@ -252,7 +260,8 @@ static int get_client_address( if (my_bind(ctx, name, port, &(ctx->notifSock))) goto err; } - + } // complete URL + *address = strdup(address_override); } else { // address_override == NULL