ubik: Rearrange some initialization code

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>
This commit is contained in:
Marc Dionne 2011-01-19 21:57:58 -05:00 committed by Derrick Brashear
parent fc26ba30c3
commit 7caf4143e2

View File

@ -423,6 +423,19 @@ ubik_ServerInitCommon(afs_uint32 myHost, short myPort,
udisk_Init(ubik_nBuffers); udisk_Init(ubik_nBuffers);
ulock_Init(); 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; ubik_callPortal = myPort;
/* try to get an additional security object */ /* try to get an additional security object */
ubik_sc[0] = rxnull_NewServerSecurityObject(); ubik_sc[0] = rxnull_NewServerSecurityObject();
@ -486,20 +499,6 @@ ubik_ServerInitCommon(afs_uint32 myHost, short myPort,
NULL, "rx_ServerProc", &junk); NULL, "rx_ServerProc", &junk);
#endif #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 */ /* now start up async processes */
#ifdef AFS_PTHREAD_ENV #ifdef AFS_PTHREAD_ENV
/* do assert stuff */ /* do assert stuff */