Commit 42f2a836 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

rename ber_init() to ber_init_w_nullc in preparation of LDAPv3 ber_init()

parent 43f29c3c
......@@ -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
......
......@@ -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 )
......
......@@ -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 ) {
......
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment