]> git.sur5r.net Git - openldap/commitdiff
backend operations check
authorJong Hyuk Choi <jongchoi@openldap.org>
Tue, 9 Mar 2004 20:43:19 +0000 (20:43 +0000)
committerJong Hyuk Choi <jongchoi@openldap.org>
Tue, 9 Mar 2004 20:43:19 +0000 (20:43 +0000)
servers/slapd/backend.c

index cb27cdb7aa65646b288df0ab684eb43159a324a8..5c7ac050b46a1ffa4abe3d95f400503d19b04cfe 100644 (file)
@@ -409,6 +409,21 @@ int backend_startup(Backend *be)
 
                if ( !LDAP_STAILQ_EMPTY( &backendDB[i].be_syncinfo )) {
                        syncinfo_t *si;
+
+                       if ( !( backendDB[i].be_search && backendDB[i].be_add &&
+                               backendDB[i].be_modify && backendDB[i].be_delete )) {
+#ifdef NEW_LOGGING
+                               LDAP_LOG( BACKEND, CRIT, 
+                                       "backend_startup: database(%d) does not support "
+                                       "operations required for syncrepl", i, 0, 0 );
+#else
+                               Debug( LDAP_DEBUG_ANY,
+                                       "backend_startup: database(%d) does not support "
+                                       "operations required for syncrepl", i, 0, 0 );
+#endif
+                               continue;
+                       }
+
                        LDAP_STAILQ_FOREACH( si, &backendDB[i].be_syncinfo, si_next ) {
                                si->si_be = &backendDB[i];
                                init_syncrepl( si );