]> git.sur5r.net Git - openldap/commitdiff
more fixes to back-ldap runtime configuration (ITS#3895)
authorPierangelo Masarati <ando@openldap.org>
Tue, 26 Jul 2005 00:11:11 +0000 (00:11 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 26 Jul 2005 00:11:11 +0000 (00:11 +0000)
servers/slapd/back-ldap/config.c

index 9b25ed06c6ceeb9182632b304417255deb061600..0c1d9b754b8c2e9613fd4a5788a6549b070d18b6 100644 (file)
@@ -326,7 +326,7 @@ ldap_back_cf_gen( ConfigArgs *c )
                                        bv.bv_len + 1 );
                        }
 
-                       c->value_string = bv.bv_val;
+                       ber_bvarray_add( &c->rvalue_vals, &bv );
                        break;
                }
 
@@ -439,13 +439,13 @@ ldap_back_cf_gen( ConfigArgs *c )
                        if ( !BER_BVISNULL( &bv ) ) {
                                ber_len_t       len = bv.bv_len + bc.bv_len;
 
-                               c->value_string = ch_realloc( bv.bv_val, len + 1 );
+                               bv.bv_val = ch_realloc( bv.bv_val, len + 1 );
 
                                assert( bc.bv_val[ 0 ] == ' ' );
 
-                               (void)lutil_strcopy( &c->value_string[ bv.bv_len ], bc.bv_val );
-
+                               ptr = lutil_strcopy( &bv.bv_val[ bv.bv_len ], bc.bv_val );
                                free( bc.bv_val );
+                               bv.bv_len = ptr - bv.bv_val;
 
                        } else {
                                for ( i = 0; isspace( bc.bv_val[ i ] ); i++ )
@@ -456,9 +456,11 @@ ldap_back_cf_gen( ConfigArgs *c )
                                        AC_MEMCPY( bc.bv_val, &bc.bv_val[ i ], bc.bv_len + 1 );
                                }
 
-                               c->value_string = bv.bv_val;
+                               bv = bc;
                        }
                        
+                       ber_bvarray_add( &c->rvalue_vals, &bv );
+
                        break;
                }