No destroy of the external socket on subsequent edg_wll_NotifBind() calls.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Fri, 31 Oct 2008 16:36:11 +0000 (16:36 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Fri, 31 Oct 2008 16:36:11 +0000 (16:36 +0000)
org.glite.lb.client/src/notification.c

index 14dd73b..32fac6f 100644 (file)
@@ -195,11 +195,8 @@ static int get_client_address(
                                                goto err;
                        // else: resue socket
                }
-               else    
-                       // used supplied socket
-                       ctx->notifSock = fd;
        
-               if (getsockname(ctx->notifSock,(struct sockaddr *)  &a, &alen)) 
+               if (getsockname(fd == -1 ? ctx->notifSock : fd,(struct sockaddr *)  &a, &alen)) 
                        return edg_wll_SetError(ctx, errno, "getsockname() failed");
 
                if (a.sin_addr.s_addr == INADDR_ANY)