Use port in ugen_ClientInit
authorHartmut Reuter <reuter@rzg.mpg.de>
Thu, 11 Nov 2010 15:12:18 +0000 (16:12 +0100)
committerDerrick Brashear <shadow@dementia.org>
Fri, 12 Nov 2010 15:19:30 +0000 (07:19 -0800)
Use the port information in ugen_ClientInit also if no server was
specified and info.hostAddr[i].sin_port is not set.

Change-Id: I7f53f1bea0b034018d44acf0d0ae3b3a39b85134
Reviewed-on: http://gerrit.openafs.org/3293
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/ubik/uinit.c

index 41a63f5..5b167ae 100644 (file)
@@ -125,6 +125,8 @@ ugen_ClientInit(int noAuthFlag, const char *confDir, char *cellName, afs_int32 s
            return -1;
        }
        for (i = 0; i < info.numServers; i++) {
+           if (!info.hostAddr[i].sin_port && port)
+               info.hostAddr[i].sin_port = port;
            serverconns[i] =
                rx_NewConnection(info.hostAddr[i].sin_addr.s_addr,
                                 info.hostAddr[i].sin_port, usrvid,