From c6bf6672aa736339d2d8fd329bf7db59f19916b8 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 12 Nov 2006 02:22:23 +0000 Subject: [PATCH] Add valx arg to config_parse_add - indicate which value in the current operation is executing (as opposed to c->valx which indicates which value in the target is being changed) --- servers/slapd/bconfig.c | 4 ++-- servers/slapd/config.c | 4 ++-- servers/slapd/config.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 9e44314f69..77249df4de 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -3950,7 +3950,7 @@ config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs, if ( ptr ) ca->line = ptr+1; } ca->valx = i; - rc = config_parse_add( ct, ca ); + rc = config_parse_add( ct, ca, i ); if ( rc ) { rc = LDAP_OTHER; goto done; @@ -4321,7 +4321,7 @@ config_modify_internal( CfEntryInfo *ce, Operation *op, SlapReply *rs, ca->line = ptr+1; } } - rc = config_parse_add( ct, ca ); + rc = config_parse_add( ct, ca, i ); if ( rc ) { rc = LDAP_OTHER; goto out; diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 290aa1a8ef..77b708b725 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -618,12 +618,12 @@ config_parse_vals(ConfigTable *ct, ConfigArgs *c, int valx) } int -config_parse_add(ConfigTable *ct, ConfigArgs *c) +config_parse_add(ConfigTable *ct, ConfigArgs *c, int valx) { int rc = 0; snprintf( c->log, sizeof( c->log ), "%s: value #%d", - ct->ad->ad_cname.bv_val, c->valx ); + ct->ad->ad_cname.bv_val, valx ); c->argc = 1; c->argv[0] = ct->ad->ad_cname.bv_val; diff --git a/servers/slapd/config.h b/servers/slapd/config.h index aaf4855eb0..e99d009547 100644 --- a/servers/slapd/config.h +++ b/servers/slapd/config.h @@ -165,7 +165,7 @@ void init_config_argv( ConfigArgs *c ); int init_config_attrs(ConfigTable *ct); int init_config_ocs( ConfigOCs *ocs ); int config_parse_vals(ConfigTable *ct, ConfigArgs *c, int valx); -int config_parse_add(ConfigTable *ct, ConfigArgs *c); +int config_parse_add(ConfigTable *ct, ConfigArgs *c, int valx); int read_config_file(const char *fname, int depth, ConfigArgs *cf, ConfigTable *cft ); -- 2.39.5