]> git.sur5r.net Git - openldap/commitdiff
Fix stupid "got <garbage> of 0 so far" debug message after ber_get_next.
authorHoward Chu <hyc@openldap.org>
Tue, 19 Oct 1999 12:15:42 +0000 (12:15 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 19 Oct 1999 12:15:42 +0000 (12:15 +0000)
servers/slapd/connection.c

index 483c7d68b228ed04ad448ec2a8ecc68960839202..57a6280d82c51d35d166ffe2110e7fef9c276204 100644 (file)
@@ -927,7 +927,8 @@ connection_input(
                        ber_pvt_sb_get_desc( conn->c_sb ), err, STRERROR(err) );
                Debug( LDAP_DEBUG_TRACE,
                        "\t*** got %ld of %lu so far\n",
-                       (long)(conn->c_currentber->ber_rwptr - conn->c_currentber->ber_buf),
+                       conn->c_currentber->ber_buf ?
+                       (long)(conn->c_currentber->ber_rwptr - conn->c_currentber->ber_buf) : 0,
                        conn->c_currentber->ber_len, 0 );
 
                if ( err != EWOULDBLOCK && err != EAGAIN ) {