From 88cdbab5f4b5f3a39786fc33768e09644f7b568e Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 21 Apr 2005 19:31:39 +0000 Subject: [PATCH] config cleanup handler --- servers/slapd/bconfig.c | 2 ++ servers/slapd/config.h | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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); -- 2.39.5