[Fedora-directory-commits] ldapserver/ldap/servers/slapd schema.c, 1.12, 1.13

Noriko Hosoi (nhosoi) fedora-directory-commits at redhat.com
Wed Jun 4 23:40:59 UTC 2008


Author: nhosoi

Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9834

Modified Files:
	schema.c 
Log Message:
Resolves: #436837 
Summary: Dynamically reload schema via task interface
Description: slapi_validate_schema_files: call dse_destroy only when the previous validation was successful.



Index: schema.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/schema.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- schema.c	4 Jun 2008 22:22:55 -0000	1.12
+++ schema.c	4 Jun 2008 23:40:57 -0000	1.13
@@ -4234,7 +4234,12 @@
 				/* ldbm has some internal attributes to be added */
 				backend_plugin = plugin_get_by_name("ldbm database");
 				if (backend_plugin) {
-					(backend_plugin->plg_add_schema)( NULL );
+					if (backend_plugin->plg_add_schema) {
+						(backend_plugin->plg_add_schema)( NULL );
+					} else {
+						slapi_log_error( SLAPI_LOG_FATAL, "init_schema_dse",
+							"backend has not set internal schema\n" );
+					}
 				}
 			}
 		}
@@ -4912,10 +4917,10 @@
 	struct dse *my_pschemadse = NULL;
 	int rc = init_schema_dse_ext(schemadir, NULL, &my_pschemadse,
 			DSE_SCHEMA_NO_LOAD | DSE_SCHEMA_NO_BACKEND);
-	dse_destroy(my_pschemadse);
-	if (rc)
+	if (rc) {
+		dse_destroy(my_pschemadse);
 		return LDAP_SUCCESS;
-	else {
+	} else {
 		slapi_log_error( SLAPI_LOG_FATAL, "schema_reload",
 				"schema file validation failed\n" );
 		return LDAP_OBJECT_CLASS_VIOLATION;




More information about the Fedora-directory-commits mailing list