From: Pierangelo Masarati Date: Thu, 23 Jan 2003 22:45:17 +0000 (+0000) Subject: cleanup versioning X-Git-Tag: NO_SLAP_OP_BLOCKS~522 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5a771fcac0a11194ec37447e228452b1e02ab9ce;p=openldap cleanup versioning --- diff --git a/servers/slapd/back-meta/conn.c b/servers/slapd/back-meta/conn.c index 7004349f35..8289819a88 100644 --- a/servers/slapd/back-meta/conn.c +++ b/servers/slapd/back-meta/conn.c @@ -224,11 +224,10 @@ init_one_conn( Connection *conn, Operation *op, struct metatarget *lt, - int vers, struct metasingleconn *lsc ) { - int err; + int err, vers; /* * Already init'ed @@ -244,11 +243,12 @@ init_one_conn( if ( err != LDAP_SUCCESS ) { return ldap_back_map_result( err ); } - + /* * Set LDAP version. This will always succeed: If the client * bound with a particular version, then so can we. */ + vers = conn->c_protocol; ldap_set_option( lsc->ld, LDAP_OPT_PROTOCOL_VERSION, &vers ); /* @@ -335,7 +335,7 @@ meta_back_getconn( int *candidate ) { struct metaconn *lc, lc_curr; - int vers, cached = -1, i = -1, err = LDAP_SUCCESS; + int cached = -1, i = -1, err = LDAP_SUCCESS; int new_conn = 0; /* Searches for a metaconn in the avl tree */ @@ -352,8 +352,6 @@ meta_back_getconn( new_conn = 1; } - vers = conn->c_protocol; - /* * looks in cache, if any */ @@ -406,7 +404,7 @@ meta_back_getconn( * sends the appropriate result. */ err = init_one_conn( conn, op, li->targets[ i ], - vers, &lc->conns[ i ] ); + &lc->conns[ i ] ); if ( err != LDAP_SUCCESS ) { /* @@ -436,7 +434,7 @@ meta_back_getconn( * also init'd */ int lerr = init_one_conn( conn, op, li->targets[ i ], - vers, &lc->conns[ i ] ); + &lc->conns[ i ] ); if ( lerr != LDAP_SUCCESS ) { /* @@ -464,7 +462,7 @@ meta_back_getconn( */ int lerr = init_one_conn( conn, op, li->targets[ i ], - vers, &lc->conns[ i ] ); + &lc->conns[ i ] ); if ( lerr != LDAP_SUCCESS ) { /*