]> git.sur5r.net Git - openldap/commitdiff
ITS#7113 fix check order in connection_write()
authorKevan Carstensen <kacarstensen@csupomona.edu>
Sun, 22 Jan 2012 01:26:37 +0000 (17:26 -0800)
committerHoward Chu <hyc@openldap.org>
Sun, 22 Jan 2012 01:27:47 +0000 (17:27 -0800)
servers/slapd/connection.c

index a070500ecbe86ace99eddc7cca2ad539bf591667..b29e2f22f00182be9d5a24fa41d828f45277b214 100644 (file)
@@ -1892,8 +1892,6 @@ int connection_write(ber_socket_t s)
 
        assert( connections != NULL );
 
-       slapd_clr_write( s, 0 );
-
        c = connection_get( s );
        if( c == NULL ) {
                Debug( LDAP_DEBUG_ANY,
@@ -1902,6 +1900,8 @@ int connection_write(ber_socket_t s)
                return -1;
        }
 
+       slapd_clr_write( s, 0 );
+
 #ifdef HAVE_TLS
        if ( c->c_is_tls && c->c_needs_tls_accept ) {
                connection_return( c );