rsrv: no lazy init of BUCKET
This commit is contained in:
@@ -2497,12 +2497,7 @@ int camessage ( struct client *client )
|
||||
unsigned bytes_left;
|
||||
int status = RSRV_ERROR;
|
||||
|
||||
if ( ! pCaBucket ) {
|
||||
pCaBucket = bucketCreate(CAS_HASH_TABLE_SIZE);
|
||||
if(!pCaBucket){
|
||||
return RSRV_ERROR;
|
||||
}
|
||||
}
|
||||
assert(pCaBucket);
|
||||
|
||||
/* drain remnents of large messages that will not fit */
|
||||
if ( client->recvBytesToDrain ) {
|
||||
|
||||
@@ -298,7 +298,9 @@ int rsrv_init (void)
|
||||
freeListInitPvt ( &rsrvLargeBufFreeListTCP, rsrvSizeofLargeBufTCP, 1 );
|
||||
ellInit ( &casIntfAddrList );
|
||||
ellInit ( &beaconAddrList );
|
||||
pCaBucket = NULL;
|
||||
pCaBucket = bucketCreate(CAS_HASH_TABLE_SIZE);
|
||||
if (!pCaBucket)
|
||||
cantProceed("RSRV failed to allocate ID lookup table\n");
|
||||
|
||||
castcp_startStopEvent = epicsEventMustCreate(epicsEventEmpty);
|
||||
castcp_ctl = ctlPause;
|
||||
@@ -552,12 +554,10 @@ void casr (unsigned level)
|
||||
MAX_TCP,
|
||||
(unsigned int) freeListItemsAvail ( rsrvLargeBufFreeListTCP ),
|
||||
rsrvSizeofLargeBufTCP );
|
||||
if(pCaBucket){
|
||||
printf( "The server's resource id conversion table:\n");
|
||||
LOCK_CLIENTQ;
|
||||
bucketShow (pCaBucket);
|
||||
UNLOCK_CLIENTQ;
|
||||
}
|
||||
printf( "The server's resource id conversion table:\n");
|
||||
LOCK_CLIENTQ;
|
||||
bucketShow (pCaBucket);
|
||||
UNLOCK_CLIENTQ;
|
||||
printf ( "The server's array size limit is %u bytes max\n",
|
||||
rsrvSizeofLargeBufTCP );
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ GLBLTYPE ELLLIST clientQudp; /* locked by clientQlock */
|
||||
GLBLTYPE ELLLIST beaconAddrList;
|
||||
GLBLTYPE ELLLIST casIntfAddrList;
|
||||
GLBLTYPE epicsMutexId clientQlock;
|
||||
GLBLTYPE BUCKET *pCaBucket;
|
||||
GLBLTYPE BUCKET *pCaBucket; /* locked by clientQlock */
|
||||
GLBLTYPE void *rsrvClientFreeList;
|
||||
GLBLTYPE void *rsrvChanFreeList;
|
||||
GLBLTYPE void *rsrvEventFreeList;
|
||||
@@ -178,7 +178,7 @@ GLBLTYPE void *rsrvSmallBufFreeListTCP;
|
||||
GLBLTYPE void *rsrvLargeBufFreeListTCP;
|
||||
GLBLTYPE unsigned rsrvSizeofLargeBufTCP;
|
||||
GLBLTYPE void *rsrvPutNotifyFreeList;
|
||||
GLBLTYPE unsigned rsrvChannelCount;
|
||||
GLBLTYPE unsigned rsrvChannelCount; /* locked by clientQlock */
|
||||
|
||||
GLBLTYPE epicsEventId casudp_startStopEvent;
|
||||
GLBLTYPE epicsEventId beacon_startStopEvent;
|
||||
|
||||
Reference in New Issue
Block a user