ubik: Rearrange some initialization code
authorMarc Dionne <marc.c.dionne@gmail.com>
Thu, 20 Jan 2011 02:57:58 +0000 (21:57 -0500)
committerDerrick Brashear <shadow@dementia.org>
Sun, 6 Mar 2011 18:07:55 +0000 (10:07 -0800)
Some basic initialization should precede creating the RX
services.

Change-Id: Ic88d639be12ee8edd2ec7b61c2a5df435b59f663
Reviewed-on: http://gerrit.openafs.org/4144
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/ubik/ubik.c

index ca74579..c91ce7d 100644 (file)
@@ -423,6 +423,19 @@ ubik_ServerInitCommon(afs_uint32 myHost, short myPort,
     udisk_Init(ubik_nBuffers);
     ulock_Init();
 
+    code = uvote_Init();
+    if (code)
+       return code;
+    code = urecovery_Initialize(tdb);
+    if (code)
+       return code;
+    if (info)
+       code = ubeacon_InitServerListByInfo(myHost, info, clones);
+    else
+       code = ubeacon_InitServerList(myHost, serverList);
+    if (code)
+       return code;
+
     ubik_callPortal = myPort;
     /* try to get an additional security object */
     ubik_sc[0] = rxnull_NewServerSecurityObject();
@@ -486,20 +499,6 @@ ubik_ServerInitCommon(afs_uint32 myHost, short myPort,
               NULL, "rx_ServerProc", &junk);
 #endif
 
-    /* do basic initialization */
-    code = uvote_Init();
-    if (code)
-       return code;
-    code = urecovery_Initialize(tdb);
-    if (code)
-       return code;
-    if (info)
-       code = ubeacon_InitServerListByInfo(myHost, info, clones);
-    else
-       code = ubeacon_InitServerList(myHost, serverList);
-    if (code)
-       return code;
-
     /* now start up async processes */
 #ifdef AFS_PTHREAD_ENV
 /* do assert stuff */