diff options
author | Noriko Hosoi <nhosoi@redhat.com> | 2008-06-10 18:50:07 +0000 |
---|---|---|
committer | Noriko Hosoi <nhosoi@redhat.com> | 2008-06-10 18:50:07 +0000 |
commit | 081b44e6cadff60ee16e7f80d017b0d0aa71dd7f (patch) | |
tree | 7f558b90bce22a87ed24fb576c21c2de31459392 | |
parent | ec3d1f1e4c279a4d30bb05ab5d61b6cd97586090 (diff) | |
download | ds-081b44e6cadff60ee16e7f80d017b0d0aa71dd7f.tar.gz ds-081b44e6cadff60ee16e7f80d017b0d0aa71dd7f.tar.xz ds-081b44e6cadff60ee16e7f80d017b0d0aa71dd7f.zip |
Resolves: #436837
Summary: Dynamically reload schema via task interface (comment #15)
Description: fixed the broken function declaration.
-rw-r--r-- | ldap/servers/slapd/proto-slap.h | 3 | ||||
-rw-r--r-- | ldap/servers/slapd/schema.c | 16 | ||||
-rw-r--r-- | ldap/servers/slapd/slapi-private.h | 2 |
3 files changed, 9 insertions, 12 deletions
diff --git a/ldap/servers/slapd/proto-slap.h b/ldap/servers/slapd/proto-slap.h index 8878c2da..566dff06 100644 --- a/ldap/servers/slapd/proto-slap.h +++ b/ldap/servers/slapd/proto-slap.h @@ -857,9 +857,6 @@ const CSN *g_get_global_schema_csn(); /* csn is consumed. */ void g_set_global_schema_csn(CSN *csn); void slapi_schema_expand_objectclasses( Slapi_Entry *e ); -/* lock to protect both objectclass and schema_dse */ -void slapi_load_schemafile_lock( void ); -void slapi_load_schemafile_unlock( void ); /* API to validate the schema files */ int slapi_validate_schema_files(char *schemadir); /* API to reload the schema files */ diff --git a/ldap/servers/slapd/schema.c b/ldap/servers/slapd/schema.c index 7dc334b0..d116e340 100644 --- a/ldap/servers/slapd/schema.c +++ b/ldap/servers/slapd/schema.c @@ -2723,7 +2723,7 @@ read_oc_ldif_return( int retVal, * DSE_SCHEMA_NO_CHECK -- schema won't be checked * DSE_SCHEMA_NO_GLOCK -- don't lock global resources * DSE_SCHEMA_LOCKED -- already locked with - * slapi_load_schemafile_lock; + * reload_schemafile_lock; * no further lock needed * schema_ds4x_compat: if non-zero, act like Netscape DS 4.x * @@ -3143,8 +3143,8 @@ slapi_check_at_sup_dependency(char *sup, char *oid) * DSE_SCHEMA_NO_GLOCK -- locking of global resources is turned off; * this saves time during initialization since * the server operates in single threaded mode - * at that time or in slapi_load_schemafile_lock. - * DSE_SCHEMA_LOCKED -- already locked with slapi_load_schemafile_lock; + * at that time or in reload_schemafile_lock. + * DSE_SCHEMA_LOCKED -- already locked with reload_schemafile_lock; * no further lock needed * * if is_user_defined is true, force attribute type to be user defined. @@ -4897,14 +4897,14 @@ schema_expand_objectclasses_nolock( Slapi_Entry *e ) /* lock to protect both objectclass and schema_dse */ static void -slapi_load_schemafile_lock() +reload_schemafile_lock() { oc_lock_write(); schema_dse_lock_write(); } static void -slapi_load_schemafile_unlock() +reload_schemafile_unlock() { schema_dse_unlock(); oc_unlock(); @@ -4947,7 +4947,7 @@ slapi_reload_schema_files(char *schemadir) return LDAP_LOCAL_ERROR; } slapi_be_Wlock(be); /* be lock must be outer of schemafile lock */ - slapi_load_schemafile_lock(); + reload_schemafile_lock(); attr_syntax_delete_all(); oc_delete_all_nolock(); rc = init_schema_dse_ext(schemadir, be, &my_pschemadse, @@ -4955,11 +4955,11 @@ slapi_reload_schema_files(char *schemadir) if (rc) { dse_destroy(pschemadse); pschemadse = my_pschemadse; - slapi_load_schemafile_unlock(); + reload_schemafile_unlock(); slapi_be_Unlock(be); return LDAP_SUCCESS; } else { - slapi_load_schemafile_unlock(); + reload_schemafile_unlock(); slapi_be_Unlock(be); slapi_log_error( SLAPI_LOG_FATAL, "schema_reload", "schema file reload failed\n" ); diff --git a/ldap/servers/slapd/slapi-private.h b/ldap/servers/slapd/slapi-private.h index 20116a2c..59e95d4a 100644 --- a/ldap/servers/slapd/slapi-private.h +++ b/ldap/servers/slapd/slapi-private.h @@ -1084,7 +1084,7 @@ void schema_expand_objectclasses_nolock( Slapi_Entry *e ); #define DSE_SCHEMA_NO_GLOCK 0x0010 /* don't lock global resources */ #define DSE_SCHEMA_LOCKED 0x0020 /* already locked with - * slapi_load_schemafile_lock; + * reload_schemafile_lock; * no further lock needed */ #define DSE_SCHEMA_USER_DEFINED_ONLY 0x0100 /* refresh user defined schema */ |