ubik: Initialize ubik_callPortal earlier
authorAndrew Deason <adeason@sinenomine.net>
Fri, 4 May 2012 22:13:32 +0000 (17:13 -0500)
committerDerrick Brashear <shadow@dementix.org>
Sat, 5 May 2012 00:30:32 +0000 (17:30 -0700)
As of 7caf4143, we call ubeacon_InitServerList* before ubik_callPortal
is set, causing Rx connections to be created to port 0, causing
various problems with communicating with other sites. Initialize
ubik_callPortal to the correct value before calling any such
functions, so we create connections to the right port.

Change-Id: I37dbf575bcdec10463c7b6006738678096a92573
Reviewed-on: http://gerrit.openafs.org/7349
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

src/ubik/ubik.c

index a0c7afd..1956bac 100644 (file)
@@ -447,6 +447,8 @@ ubik_ServerInitCommon(afs_uint32 myHost, short myPort,
     if (code < 0)
        return code;
 
+    ubik_callPortal = myPort;
+
     udisk_Init(ubik_nBuffers);
     ulock_Init();
 
@@ -463,7 +465,6 @@ ubik_ServerInitCommon(afs_uint32 myHost, short myPort,
     if (code)
        return code;
 
-    ubik_callPortal = myPort;
     /* try to get an additional security object */
     if (buildSecClassesProc == NULL) {
        numClasses = 3;