From: Howard Chu Date: Tue, 29 Nov 2011 16:16:34 +0000 (-0800) Subject: ITS#7098 fix del/add of first schema element X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=704e8228c0ca3fd70bfa094ba482ba993e007b4b;p=openldap ITS#7098 fix del/add of first schema element --- diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index e0851d3500..9507387813 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -1793,7 +1793,7 @@ config_generic(ConfigArgs *c) { /* else prev is NULL, append to end of global list */ } if(parse_oc(c, &oc, prev)) return(1); - if (!cfn->c_oc_head) cfn->c_oc_head = oc; + if (!cfn->c_oc_head || !c->valx) cfn->c_oc_head = oc; if (cfn->c_oc_tail == prev) cfn->c_oc_tail = oc; } break; @@ -1826,7 +1826,7 @@ config_generic(ConfigArgs *c) { /* else prev is NULL, append to end of global list */ } if(parse_at(c, &at, prev)) return(1); - if (!cfn->c_at_head) cfn->c_at_head = at; + if (!cfn->c_at_head || !c->valx) cfn->c_at_head = at; if (cfn->c_at_tail == prev) cfn->c_at_tail = at; } break; @@ -1859,7 +1859,7 @@ config_generic(ConfigArgs *c) { /* else prev is NULL, append to end of global list */ } if ( parse_syn( c, &syn, prev ) ) return(1); - if ( !cfn->c_syn_head ) cfn->c_syn_head = syn; + if ( !cfn->c_syn_head || !c->valx ) cfn->c_syn_head = syn; if ( cfn->c_syn_tail == prev ) cfn->c_syn_tail = syn; } break;