]> git.sur5r.net Git - openldap/commitdiff
Add missing sockerr call
authorKurt Zeilenga <kurt@openldap.org>
Mon, 26 Jun 2000 05:23:33 +0000 (05:23 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 26 Jun 2000 05:23:33 +0000 (05:23 +0000)
servers/slapd/daemon.c

index 7e9c6931b9fd78199d23a17df8a498d5f67704c1..88dcd60d4694c547108b7cc8cb88be7c4a156934 100644 (file)
@@ -279,6 +279,7 @@ static Listener * open_listener( const char* url )
        do {
                l.sl_sd = socket( sai->ai_family, sai->ai_socktype, sai->ai_protocol);
                if ( l.sl_sd == AC_SOCKET_INVALID ) {
+                       int err = sock_errno();
                        Debug( LDAP_DEBUG_ANY,
                                "daemon: socket() failed errno=%d (%s)\n", err,
                                sock_errstr(err), 0 );
@@ -437,7 +438,7 @@ static Listener * open_listener( const char* url )
 #  ifdef LDAP_PF_UNIX
        case AF_UNIX:
                if ( chmod( (char *)sai->ai_addr, S_IRWXU ) < 0 ) {
-                       err = sock_errno();
+                       int err = sock_errno();
                        Debug( LDAP_DEBUG_ANY, "daemon: fchmod(%ld) failed errno=%d (%s)",
                                (long) l.sl_sd, err, sock_errstr(err) );
                        tcp_close( l.sl_sd );