From: Howard Chu Date: Tue, 25 Jan 2005 11:14:09 +0000 (+0000) Subject: Fix cookie init X-Git-Tag: OPENLDAP_REL_ENG_2_3_BP~262 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f6ed0b01278bbda4c1c67469c9b2ed53acee96cf;p=openldap Fix cookie init --- diff --git a/servers/slapd/main.c b/servers/slapd/main.c index d458acb033..c88876e046 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -259,7 +259,6 @@ int main( int argc, char **argv ) char *serverName; int serverMode = SLAP_SERVER_MODE; - struct berval cookie = BER_BVNULL; struct sync_cookie *scp = NULL; struct sync_cookie *scp_entry = NULL; @@ -356,8 +355,7 @@ int main( int argc, char **argv ) case 'c': /* provide sync cookie, override if exist in replica */ scp = (struct sync_cookie *) ch_calloc( 1, sizeof( struct sync_cookie )); - ber_str2bv( optarg, strlen( optarg ), 1, &cookie ); - ber_bvarray_add( &scp->octet_str, &cookie ); + ber_str2bv( optarg, 0, 1, &scp->octet_str ); slap_parse_sync_cookie( scp ); LDAP_STAILQ_FOREACH( scp_entry, &slap_sync_cookie, sc_next ) {