*/
int connections_init(void)
{
+ int i;
+
assert( connections == NULL );
if( connections != NULL) {
assert( connections[0].c_struct_state == SLAP_C_UNINITIALIZED );
assert( connections[dtblsize-1].c_struct_state == SLAP_C_UNINITIALIZED );
+ for (i=0; i<dtblsize; i++) connections[i].c_conn_idx = i;
+
/*
* per entry initialization of the Connection array initialization
* will be done by connection_init()
typedef struct slap_conn {
int c_struct_state; /* structure management state */
int c_conn_state; /* connection state */
+ int c_conn_idx; /* slot in connections array */
ldap_pvt_thread_mutex_t c_mutex; /* protect the connection */
Sockbuf *c_sb; /* ber connection stuff */