From: Kurt Zeilenga Date: Mon, 24 Dec 2001 20:20:29 +0000 (+0000) Subject: This really should work... but it's no more broken than last commit X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~530 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5b49e1a9c501814013b2c7e0c4588b32771272d9;p=openldap This really should work... but it's no more broken than last commit --- diff --git a/servers/slapd/entry.c b/servers/slapd/entry.c index 78ca41f9af..6bf1fac535 100644 --- a/servers/slapd/entry.c +++ b/servers/slapd/entry.c @@ -307,7 +307,8 @@ str2entry( char *s ) return NULL; } - e->e_nname = *ndn; + e->e_nname.bv_val = ndn->bv_val; + e->e_nname.bv_len = ndn->bv_len; free( ndn ); } diff --git a/servers/slapd/tools/slapcommon.c b/servers/slapd/tools/slapcommon.c index 7cee79bbb6..ffa14fa6e4 100644 --- a/servers/slapd/tools/slapcommon.c +++ b/servers/slapd/tools/slapcommon.c @@ -121,7 +121,7 @@ slap_tool_init( switch ( i ) { case 'b': base.bv_val = strdup( optarg ); - base.bv_len = strlen( optarg ); + base.bv_len = strlen( base.bv_val ); case 'c': /* enable continue mode */ continuemode++; @@ -226,7 +226,7 @@ slap_tool_init( if( be == NULL ) { fprintf( stderr, "%s: slap_init no backend for \"%s\"\n", - progname, base ); + progname, base.bv_val ); exit( EXIT_FAILURE ); } /* If the named base is a glue master, operate on the @@ -248,7 +248,8 @@ slap_tool_init( } else if ( dbnum < 0 || dbnum > (nbackends-1) ) { fprintf( stderr, "Database number selected via -n is out of range\n" - "Must be in the range 1 to %d (number of databases in the config file)\n", + "Must be in the range 1 to %d" + " (number of databases in the config file)\n", nbackends ); exit( EXIT_FAILURE );