]> git.sur5r.net Git - openldap/commitdiff
fix for the cascading replication (reenabling test019)
authorJong Hyuk Choi <jongchoi@openldap.org>
Thu, 13 Nov 2003 00:11:44 +0000 (00:11 +0000)
committerJong Hyuk Choi <jongchoi@openldap.org>
Thu, 13 Nov 2003 00:11:44 +0000 (00:11 +0000)
include/ldap.h
servers/slapd/syncrepl.c
tests/scripts/test019-syncreplication-cascade

index 6fa49e4121df48256c931e3908ea1ecd7d43c744..cf96aa7f9818de4e967bd566fe5698ae5586e728 100644 (file)
@@ -219,10 +219,6 @@ typedef struct ldapcontrol {
 #define LDAP_TAG_REFRESHDONE   ((ber_tag_t) 0x01U)
 #define LDAP_TAG_RELOAD_HINT   ((ber_tag_t) 0x01U)
 
-#define LDAP_SYNC_STATE_MODE           0
-#define LDAP_SYNC_LOG_MODE                     1
-#define LDAP_SYNC_PERSIST_MODE         2
-
 #define LDAP_SYNC_PRESENT              0
 #define LDAP_SYNC_ADD                  1
 #define LDAP_SYNC_MODIFY               2
index ff38a90c6264e477cf6179f6e520c521d1465b98..92d51347eca627edc378f37f9edb88d0fcc0b7b9 100644 (file)
@@ -571,7 +571,15 @@ do_syncrep2(
                                                ber_scanf( ber, "t{", &tag );
                                                if ( ber_peek_tag( ber, &len ) == LDAP_TAG_SYNC_COOKIE )
                                                {
-                                                       ber_scanf( ber, "m", &tag, &cookie );
+                                                       ber_scanf( ber, "m", &cookie );
+                                                       if ( cookie.bv_val ) {
+                                                               struct berval tmp_bv;
+                                                               ber_dupbv( &tmp_bv, &cookie );
+                                                               ber_bvarray_add( &syncCookie.octet_str, &tmp_bv);
+                                                       }
+                                                       if ( syncCookie.octet_str &&
+                                                                        syncCookie.octet_str[0].bv_val )
+                                                               slap_parse_sync_cookie( &syncCookie );
                                                }
                                                if ( ber_peek_tag( ber, &len ) ==
                                                                        LDAP_TAG_REFRESHDONE )
@@ -585,7 +593,15 @@ do_syncrep2(
                                                ber_scanf( ber, "t{", &tag );
                                                if ( ber_peek_tag( ber, &len ) == LDAP_TAG_SYNC_COOKIE )
                                                {
-                                                       ber_scanf( ber, "m", &tag, &cookie );
+                                                       ber_scanf( ber, "m", &cookie );
+                                                       if ( cookie.bv_val ) {
+                                                               struct berval tmp_bv;
+                                                               ber_dupbv( &tmp_bv, &cookie );
+                                                               ber_bvarray_add( &syncCookie.octet_str, &tmp_bv);
+                                                       }
+                                                       if ( syncCookie.octet_str &&
+                                                                        syncCookie.octet_str[0].bv_val )
+                                                               slap_parse_sync_cookie( &syncCookie );
                                                }
                                                if ( ber_peek_tag( ber, &len ) ==
                                                                        LDAP_TAG_REFRESHDELETES )
index a1310a8ceb9218a2c247c4926efd5f0aa227029a..2a92834d68055047227595425403e02f026ad887 100755 (executable)
@@ -1,9 +1,6 @@
 #! /bin/sh
 # $OpenLDAP$
 
-echo "temporarily disabled"
-exit 0
-
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh