From: Howard Chu Date: Thu, 21 Apr 2005 19:31:39 +0000 (+0000) Subject: config cleanup handler X-Git-Tag: OPENLDAP_AC_BP~850 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=88cdbab5f4b5f3a39786fc33768e09644f7b568e;p=openldap config cleanup handler --- diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 5d3995954e..0e05bc2561 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -3897,6 +3897,8 @@ config_modify_internal( CfEntryInfo *ce, Operation *op, SlapReply *rs, } out: + if ( ca.cleanup ) + ca.cleanup( &ca ); if ( rc == LDAP_SUCCESS ) { attrs_free( save_attrs ); } else { diff --git a/servers/slapd/config.h b/servers/slapd/config.h index ff0d907e97..30b2d199e8 100644 --- a/servers/slapd/config.h +++ b/servers/slapd/config.h @@ -81,6 +81,10 @@ typedef struct ConfigOCs { #endif } ConfigOCs; +struct config_args_s; + +typedef int (ConfigDriver)(struct config_args_s *c); + typedef struct config_args_s { int argc; char **argv; @@ -114,6 +118,7 @@ typedef struct config_args_s { BackendDB *be; BackendInfo *bi; void *private; /* anything */ + ConfigDriver *cleanup; } ConfigArgs; #define value_int values.v_int @@ -124,8 +129,6 @@ typedef struct config_args_s { #define value_dn values.v_dn.vdn_dn #define value_ndn values.v_dn.vdn_ndn -typedef int (ConfigDriver)(ConfigArgs *c); - int config_register_schema(ConfigTable *ct, ConfigOCs *co); int config_get_vals(ConfigTable *ct, ConfigArgs *c); int config_add_vals(ConfigTable *ct, ConfigArgs *c);