]> git.sur5r.net Git - openldap/commitdiff
use ber_str2bv() instead of ch_strdup/strlen.
authorHoward Chu <hyc@openldap.org>
Mon, 18 Mar 2002 08:57:59 +0000 (08:57 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 18 Mar 2002 08:57:59 +0000 (08:57 +0000)
servers/slapd/connection.c

index 44a98c45e1fb0a4b3b430657b6ede1b62cc94346..952a6315aeb315ff9afbf7334001efea2fb731e5 100644 (file)
@@ -1349,8 +1349,7 @@ connection_input(
 #ifdef LDAP_CONNECTIONLESS
        op->o_peeraddr = peeraddr;
        if (cdn) {
-           op->o_dn.bv_val = ch_strdup( cdn );
-           op->o_dn.bv_len = strlen( op->o_dn.bv_val );
+           ber_str2bv( cdn, 0, 1, &op->o_dn );
            op->o_protocol = LDAP_VERSION2;
        }
 #endif