]> git.sur5r.net Git - openldap/commitdiff
fix DN-valued (and likely others not handled in the switch) attrs duplication (occcur...
authorPierangelo Masarati <ando@openldap.org>
Sat, 27 May 2006 19:14:39 +0000 (19:14 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 27 May 2006 19:14:39 +0000 (19:14 +0000)
servers/slapd/config.c

index ef8c52247248b860631a3c5d9a0f3347bca99202..ddfc2af581eee4f9cdbe2be4e81244ea4262ba66 100644 (file)
@@ -453,14 +453,19 @@ config_get_vals(ConfigTable *cf, ConfigArgs *c)
                                return 1;
                        }
                        break;
+               default:
+                       bv.bv_val = NULL;
+                       break;
                }
                if (bv.bv_val == c->log && bv.bv_len >= sizeof( c->log ) ) {
                        return 1;
                }
-               if (( cf->arg_type & ARGS_TYPES ) == ARG_STRING )
+               if (( cf->arg_type & ARGS_TYPES ) == ARG_STRING ) {
                        ber_bvarray_add(&c->rvalue_vals, &bv);
-               else
+               } else if ( !BER_BVISNULL( &bv ) ) {
                        value_add_one(&c->rvalue_vals, &bv);
+               }
+               /* else: maybe c->rvalue_vals already set? */
        }
        return rc;
 }