config cleanup handler

This commit is contained in:
Howard Chu 2005-04-21 19:31:39 +00:00
parent 5bf5288be5
commit 88cdbab5f4
2 changed files with 7 additions and 2 deletions

View File

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

View File

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