]> git.sur5r.net Git - openldap/commitdiff
cleanup
authorPierangelo Masarati <ando@openldap.org>
Fri, 1 Sep 2006 10:01:36 +0000 (10:01 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 1 Sep 2006 10:01:36 +0000 (10:01 +0000)
libraries/libldap/request.c
servers/slapd/attr.c
servers/slapd/back-monitor/conn.c

index 2b9060d9d70aa52bc603f426202d4282e21813b0..c140dc73b9d5905b52b363f9637f24812952122e 100644 (file)
@@ -420,6 +420,7 @@ ldap_new_connection( LDAP *ld, LDAPURLDesc **srvlist, int use_ldsb,
                                }
                                ldap_free_urldesc( srvfunc );
                        }
+
                } else {
                        int             msgid, rc;
                        struct berval   passwd = BER_BVNULL;
@@ -599,7 +600,10 @@ ldap_free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind )
                }
 #endif
 
-               /* FIXME: is this at all possible? */
+               /* FIXME: is this at all possible?
+                * ldap_ld_free() in unbind.c calls ldap_free_connection()
+                * with force == 1 __after__ explicitly calling
+                * ldap_free_request() on all requests */
                if ( force ) {
                        LDAPRequest     *lr;
 
index 36878d2398d43f960fbde55fbbd21a255c1185bd..78784736b2d54ba628d5428697182ba26aff7dee 100644 (file)
@@ -78,8 +78,7 @@ Attribute *
 attr_alloc( AttributeDescription *ad )
 {
        Attribute *a;
-       
-       
+
        ldap_pvt_thread_mutex_lock( &attr_mutex );
        if ( !attr_list )
                attr_prealloc( CHUNK_SIZE );
index a35036237c239044ba00882d99a6bd34846614c3..24e8cc4e5c136b932d4d0f99e6893b7ffcd89108 100644 (file)
@@ -181,7 +181,8 @@ monitor_subsys_conn_update(
 
                for ( n = 0, c = connection_first( &connindex );
                                c != NULL;
-                               n++, c = connection_next( c, &connindex ) ) {
+                               n++, c = connection_next( c, &connindex ) )
+               {
                        /* No Op */ ;
                }
                connection_done( c );
@@ -426,9 +427,6 @@ monitor_subsys_conn_create(
 {
        monitor_info_t  *mi = ( monitor_info_t * )op->o_bd->be_private;
 
-       Connection              *c;
-       int                     connindex;
-       monitor_entry_t         *mp;
        int                     rc = SLAP_CB_CONTINUE;
        monitor_subsys_t        *ms;
 
@@ -441,14 +439,18 @@ monitor_subsys_conn_create(
        *ep = NULL;
 
        if ( ndn == NULL ) {
-               Entry   *e = NULL,
-                       *e_tmp = NULL;
+               Connection      *c;
+               int             connindex;
+               Entry           *e = NULL,
+                               *e_tmp = NULL;
 
                /* create all the children of e_parent */
                for ( c = connection_first( &connindex );
                                c != NULL;
                                c = connection_next( c, &connindex ) )
                {
+                       monitor_entry_t         *mp;
+
                        if ( conn_create( mi, c, &e, ms ) != SLAP_CB_CONTINUE
                                        || e == NULL )
                        {
@@ -473,6 +475,8 @@ monitor_subsys_conn_create(
                *ep = e;
 
        } else {
+               Connection              *c;
+               int                     connindex;
                unsigned long           connid;
                char                    *next = NULL;
                static struct berval    nconn_bv = BER_BVC( "cn=connection " );