From: Hallvard Furuseth Date: Mon, 23 Jan 2012 23:47:48 +0000 (+0100) Subject: ITS#7131 Fix connection loop connindex usage. X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=db49dfecc98c652fcb9da5f532207a7d0cc43633;p=openldap ITS#7131 Fix connection loop connindex usage. connection_() takes a ber_socket_t *index, not int*. --- diff --git a/servers/slapd/back-monitor/conn.c b/servers/slapd/back-monitor/conn.c index f740ff0489..5426bd0f50 100644 --- a/servers/slapd/back-monitor/conn.c +++ b/servers/slapd/back-monitor/conn.c @@ -223,7 +223,7 @@ monitor_subsys_conn_update( } else if ( dn_match( &rdn, ¤t_bv ) ) { Connection *c; - int connindex; + ber_socket_t connindex; for ( n = 0, c = connection_first( &connindex ); c != NULL; @@ -445,7 +445,7 @@ monitor_subsys_conn_create( if ( ndn == NULL ) { Connection *c; - int connindex; + ber_socket_t connindex; Entry *e = NULL, *e_tmp = NULL; @@ -481,7 +481,7 @@ monitor_subsys_conn_create( } else { Connection *c; - int connindex; + ber_socket_t connindex; unsigned long connid; char *next = NULL; static struct berval nconn_bv = BER_BVC( "cn=connection " ); diff --git a/servers/slapd/back-monitor/rww.c b/servers/slapd/back-monitor/rww.c index 6a7390c306..867a06df95 100644 --- a/servers/slapd/back-monitor/rww.c +++ b/servers/slapd/back-monitor/rww.c @@ -155,7 +155,7 @@ monitor_subsys_rww_update( { monitor_info_t *mi = (monitor_info_t *)op->o_bd->be_private; Connection *c; - int connindex; + ber_socket_t connindex; long nconns, nwritewaiters, nreadwaiters; int i; diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index eb94af855f..7f9cd8adbf 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -209,7 +209,7 @@ int connections_shutdown(void) int connections_timeout_idle(time_t now) { int i = 0, writers = 0; - int connindex; + ber_socket_t connindex; Connection* c; time_t old; @@ -258,7 +258,7 @@ int connections_timeout_idle(time_t now) void connections_drop() { Connection* c; - int connindex; + ber_socket_t connindex; for( c = connection_first( &connindex ); c != NULL;