#endif
*connToUse = index;
+
+ //Lock the select connection, unlock the rest of the pool
+ edg_wll_connectionTryLock(ctx, index);
+ edg_wll_poolUnlock();
/* Old Comment: support anonymous connections, perhaps add a flag to the connPool
* struct specifying whether or not this connection shall be authenticated
end:
- edg_wll_poolUnlock(); /* One way or the other, there are no more pool-wide operations */
+// edg_wll_poolUnlock(); /* One way or the other, there are no more pool-wide operations */
+// ZS, 2 Feb 2010: Overall pool lock replaced with a connection-specific
+// lock for the most part
// xxxxx
ctx->connections->connPool[index].peerPort,index);
#endif
+ // Unlock the pool here but lock the connection in question
+ edg_wll_connectionTryLock(ctx, index);
+ edg_wll_poolUnlock();
+
#if 0
/* acquire gss credentials */
ret = edg_wll_gss_acquire_cred_gsi(
edg_wll_log_connect_end:
if (index >= 0) edg_wll_connectionTryLock(ctx, index);
- edg_wll_poolUnlock();
+// edg_wll_poolUnlock();
+// ZS, 2 Feb 2010: Overall pool lock replaced with a connection-specific
+// lock for the most part
+
#ifdef EDG_WLL_LOG_STUB
if (answer) {
printf("Entering edg_wll_initConnections\n");
#endif
+ edg_wll_poolLock();
+
if((connectionsHandle.connPool == NULL) &&
(connectionsHandle.poolSize > 0)) { /* We need to allocate memory for the connPool and connectionLock arrays */
connectionsHandle.serverConnection = (edg_wll_ConnPool *) calloc(1, sizeof(edg_wll_ConnPool));
}
+ edg_wll_poolUnlock();
return (&connectionsHandle);
}