]> git.sur5r.net Git - openldap/commitdiff
Add valx arg to config_parse_add - indicate which value in the current
authorHoward Chu <hyc@openldap.org>
Sun, 12 Nov 2006 02:22:23 +0000 (02:22 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 12 Nov 2006 02:22:23 +0000 (02:22 +0000)
operation is executing (as opposed to c->valx which indicates which
value in the target is being changed)

servers/slapd/bconfig.c
servers/slapd/config.c
servers/slapd/config.h

index 9e44314f69bb004ba4863c3602b3417d1cac7b6d..77249df4de6acb72c44d175072a06efff0ad1cac 100644 (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;
index 290aa1a8efb49ce78ddeedf76be6db22749288a6..77b708b725af279c9621cba6197469bc127c565a 100644 (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;
 
index aaf4855eb0b9f5fbed213ce8d9ae855cd904eac0..e99d00954785e8061c5fbe6ddc17be0cf9307ecc 100644 (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 );