]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#1655 and ITS#1660 fixes from HEAD
authorKurt Zeilenga <kurt@openldap.org>
Thu, 6 Jun 2002 02:46:55 +0000 (02:46 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 6 Jun 2002 02:46:55 +0000 (02:46 +0000)
servers/slapd/connection.c

index 11dd182bac18242cf1cf72c29db7859d200500c5..96c9dbcfa39b88dc4c9ac1413ef22f0cd1202779 100644 (file)
@@ -212,15 +212,15 @@ static Connection* connection_get( ber_socket_t s )
                ber_socket_t i, sd;
 
                for(i=0; i<dtblsize; i++) {
-                       ber_sockbuf_ctrl( connections[i].c_sb,
-                               LBER_SB_OPT_GET_FD, &sd );
-
                        if( connections[i].c_struct_state == SLAP_C_UNINITIALIZED ) {
                                assert( connections[i].c_conn_state == SLAP_C_INVALID );
                                assert( connections[i].c_sb == 0 );
                                break;
                        }
 
+                       ber_sockbuf_ctrl( connections[i].c_sb,
+                               LBER_SB_OPT_GET_FD, &sd );
+
                        if( connections[i].c_struct_state == SLAP_C_UNUSED ) {
                                assert( connections[i].c_conn_state == SLAP_C_INVALID );
                                assert( sd == AC_SOCKET_INVALID );
@@ -551,7 +551,7 @@ connection_destroy( Connection *c )
                 */
                if (strncmp(c->c_peer_name, "PATH=", 5) == 0) {
                        char *path = c->c_peer_name + 5;
-                       if (path != '\0') {
+                       if (path[0] != '\0') {
                                (void)unlink(path);
                        }
                }