From 42f2a836075214ee69e95e886f541a52b507ca8c Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 26 Oct 1998 02:38:39 +0000 Subject: [PATCH] rename ber_init() to ber_init_w_nullc in preparation of LDAPv3 ber_init() --- include/lber.h | 2 +- libraries/liblber/io.c | 8 +++++++- libraries/libldap/cldap.c | 2 +- libraries/libldap/result.c | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/include/lber.h b/include/lber.h index 0a028f980c..64eb34d167 100644 --- a/include/lber.h +++ b/include/lber.h @@ -161,7 +161,7 @@ LDAP_F void ber_dump LDAP_P(( BerElement *ber, int inout )); LDAP_F void ber_sos_dump LDAP_P(( Seqorset *sos )); LDAP_F unsigned long ber_get_next LDAP_P(( Sockbuf *sb, unsigned long *len, BerElement *ber )); -LDAP_F void ber_init LDAP_P(( BerElement *ber, int options )); +LDAP_F void ber_init_w_nullc LDAP_P(( BerElement *ber, int options )); LDAP_F void ber_reset LDAP_P(( BerElement *ber, int was_writing )); LDAP_END_DECL diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index 582a883d64..4f41a8a2cd 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -366,13 +366,19 @@ ber_dup( BerElement *ber ) void -ber_init( BerElement *ber, int options ) +ber_init_w_nullc( BerElement *ber, int options ) { (void) memset( (char *)ber, '\0', sizeof( BerElement )); ber->ber_tag = LBER_DEFAULT; ber->ber_options = (char) options; } +BerElement * +ber_init( struct berval *bv ) +{ + return ( NULL ); +} + void ber_reset( BerElement *ber, int was_writing ) diff --git a/libraries/libldap/cldap.c b/libraries/libldap/cldap.c index 5b9e806984..f5b8ae9782 100644 --- a/libraries/libldap/cldap.c +++ b/libraries/libldap/cldap.c @@ -297,7 +297,7 @@ cldap_result( LDAP *ld, int msgid, LDAPMessage **res, Debug( LDAP_DEBUG_TRACE, "cldap_result waiting up to %d seconds for a response\n", tv.tv_sec, 0, 0 ); - ber_init( &ber, 0 ); + ber_init_w_nullc( &ber, 0 ); ldap_set_ber_options( ld, &ber ); if ( cldap_getmsg( ld, &tv, &ber ) == -1 ) { diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index 1fc61004a2..571902ab5f 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -274,7 +274,7 @@ read1msg( LDAP *ld, int msgid, int all, Sockbuf *sb, Debug( LDAP_DEBUG_TRACE, "read1msg\n", 0, 0, 0 ); - ber_init( &ber, 0 ); + ber_init_w_nullc( &ber, 0 ); ldap_set_ber_options( ld, &ber ); /* get the next message */ @@ -516,7 +516,7 @@ build_result_ber( LDAP *ld, BerElement *ber, LDAPRequest *lr ) unsigned long len; long along; - ber_init( ber, 0 ); + ber_init_w_nullc( ber, 0 ); ldap_set_ber_options( ld, ber ); if ( ber_printf( ber, "{it{ess}}", lr->lr_msgid, (long)lr->lr_res_msgtype, lr->lr_res_errno, -- 2.39.5