]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/connection.c
Remove lint
[openldap] / servers / slapd / connection.c
index 941297947605ecfceb3047c8fffe0841e565fdfa..439c6fdd1c0210776692d9e015e5479f0d27ef48 100644 (file)
@@ -404,33 +404,39 @@ long connection_init(
 
     assert( c != NULL );
 
-    if( c->c_struct_state == SLAP_C_UNINITIALIZED ) {
+       if( c->c_struct_state == SLAP_C_UNINITIALIZED ) {
                c->c_authmech = NULL;
-       c->c_dn = NULL;
-       c->c_cdn = NULL;
+               c->c_dn = NULL;
+               c->c_cdn = NULL;
 
                c->c_listener_url = NULL;
                c->c_peer_domain = NULL;
-       c->c_peer_name = NULL;
-       c->c_sock_name = NULL;
+               c->c_peer_name = NULL;
+               c->c_sock_name = NULL;
 
-       c->c_ops = NULL;
-       c->c_pending_ops = NULL;
+               c->c_ops = NULL;
+               c->c_pending_ops = NULL;
 
                c->c_sasl_bind_mech = NULL;
                c->c_sasl_context = NULL;
                c->c_sasl_extra = NULL;
 
-       c->c_sb = ber_sockbuf_alloc( );
+               c->c_sb = ber_sockbuf_alloc( );
+
+               {
+                       ber_len_t max = sockbuf_max_incoming;
+                       ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_SET_MAX_INCOMING, &max );
+               }
+
                c->c_currentber = NULL;
 
-       /* should check status of thread calls */
-       ldap_pvt_thread_mutex_init( &c->c_mutex );
-       ldap_pvt_thread_mutex_init( &c->c_write_mutex );
-       ldap_pvt_thread_cond_init( &c->c_write_cv );
+               /* should check status of thread calls */
+               ldap_pvt_thread_mutex_init( &c->c_mutex );
+               ldap_pvt_thread_mutex_init( &c->c_write_mutex );
+               ldap_pvt_thread_cond_init( &c->c_write_cv );
 
-       c->c_struct_state = SLAP_C_UNUSED;
-    }
+               c->c_struct_state = SLAP_C_UNUSED;
+       }
 
     ldap_pvt_thread_mutex_lock( &c->c_mutex );
 
@@ -530,6 +536,11 @@ void connection2anonymous( Connection *c )
     assert( connections != NULL );
     assert( c != NULL );
 
+       {
+               ber_len_t max = sockbuf_max_incoming;
+               ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_SET_MAX_INCOMING, &max );
+       }
+
        if(c->c_authmech != NULL ) {
                free(c->c_authmech);
                c->c_authmech = NULL;
@@ -625,8 +636,14 @@ connection_destroy( Connection *c )
        }
 
        ber_sockbuf_free( c->c_sb );
+
        c->c_sb = ber_sockbuf_alloc( );
 
+       {
+               ber_len_t max = sockbuf_max_incoming;
+               ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_SET_MAX_INCOMING, &max );
+       }
+
     c->c_conn_state = SLAP_C_INVALID;
     c->c_struct_state = SLAP_C_UNUSED;
 }
@@ -1047,7 +1064,7 @@ int connection_read(ber_socket_t s)
                        c->c_needs_tls_accept = 0;
 
                        /* we need to let SASL know */
-                       ssl = (void *)ldap_pvt_tls_sb_handle( c->c_sb );
+                       ssl = (void *)ldap_pvt_tls_sb_ctx( c->c_sb );
 
                        c->c_tls_ssf = (slap_ssf_t) ldap_pvt_tls_get_strength( ssl );
                        if( c->c_tls_ssf > c->c_ssf ) {