]> git.sur5r.net Git - openldap/commitdiff
ITS#7131 Fix connection loop connindex usage.
authorHallvard Furuseth <hallvard@openldap.org>
Mon, 23 Jan 2012 23:47:48 +0000 (00:47 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 24 Jan 2012 04:19:04 +0000 (20:19 -0800)
connection_<first/next>() takes a ber_socket_t *index, not int*.

servers/slapd/back-monitor/conn.c
servers/slapd/back-monitor/rww.c
servers/slapd/connection.c

index f740ff048940333642b886eba331b70a0083bc85..5426bd0f5042232086fbc2471397de89ffd4dce7 100644 (file)
@@ -223,7 +223,7 @@ monitor_subsys_conn_update(
 
        } else if ( dn_match( &rdn, &current_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 " );
index 6a7390c3067f0841ad531f52d99881807a30f8ea..867a06df958c8aa33992d3524e585f1a283409cf 100644 (file)
@@ -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;
index eb94af855f26980da30092cba39473e457746b98..7f9cd8adbf3713228220bd48f65062ce66f985cf 100644 (file)
@@ -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;