]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/connection.c
Cleanup
[openldap] / servers / slapd / connection.c
index e1f651bd2b8aea769d8c98d741ff906fd16e596c..43faf736a511b65f30d575dcbf813fbade6c81ed 100644 (file)
@@ -783,7 +783,9 @@ void connection_closing( Connection *c, const char *why )
 {
        assert( connections != NULL );
        assert( c != NULL );
-       assert( c->c_struct_state == SLAP_C_USED );
+
+       if ( c->c_struct_state != SLAP_C_USED ) return;
+
        assert( c->c_conn_state != SLAP_C_INVALID );
 
        /* c_mutex must be locked by caller */
@@ -816,7 +818,9 @@ connection_close( Connection *c )
 {
        assert( connections != NULL );
        assert( c != NULL );
-       assert( c->c_struct_state == SLAP_C_USED );
+
+       if ( c->c_struct_state != SLAP_C_USED ) return;
+
        assert( c->c_conn_state == SLAP_C_CLOSING );
 
        /* NOTE: c_mutex should be locked by caller */