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)
This commit is contained in:
Howard Chu 2006-11-12 02:22:23 +00:00
parent 48fce3d119
commit c6bf6672aa
3 changed files with 5 additions and 5 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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 );