]> git.sur5r.net Git - openldap/commitdiff
error behavior fix and TODO
authorJong Hyuk Choi <jongchoi@openldap.org>
Thu, 18 Sep 2003 06:04:28 +0000 (06:04 +0000)
committerJong Hyuk Choi <jongchoi@openldap.org>
Thu, 18 Sep 2003 06:04:28 +0000 (06:04 +0000)
servers/slapd/syncrepl.c

index a175a349995c5d454006f4b292d7edc57800c031..120c0aad06f0d2f3c9b74dcb8bd6209c96dfb85d 100644 (file)
@@ -178,7 +178,6 @@ do_syncrepl(
        int     err;
        ber_len_t       len;
        int     syncinfo_arrived = 0;
-       int     cancel_response = 0;
 
        char **tmp = NULL;
        AttributeDescription** descs = NULL;
@@ -304,6 +303,10 @@ do_syncrepl(
                                lutil_sasl_interact,
                                defaults );
 
+               /* FIXME : different error behaviors according to
+                       1) return code
+                       2) on err policy : exit, retry, backoff ...
+               */
                if ( rc != LDAP_SUCCESS ) {
 #ifdef NEW_LOGGING
                        LDAP_LOG ( OPERATION, ERR, "do_syncrepl: "
@@ -526,20 +529,21 @@ do_syncrepl(
                                                        SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX,
                                                        &syncCookie_req, &syncCookie, &text );
                                if (si->type == LDAP_SYNC_REFRESH_AND_PERSIST) {
-                                       if ( cancel_response ) {
-                                               if ( syncCookie.bv_len && match < 0) {
-                                                       syncrepl_updateCookie( si, ld, &op, &psub, &syncCookie );
-                                               }
-                                               if ( ctrl_ber )
-                                                       ber_free( ctrl_ber, 1 );
-                                               goto done;
-                                       }
-                                       else {
-                                               if ( ctrl_ber )
-                                                       ber_free( ctrl_ber, 1 );
-                                               break;
+                                       /* FIXME : different error behaviors according to
+                                               1) err code : LDAP_BUSY ...
+                                               2) on err policy : stop service, stop sync, retry
+                                       */
+                                       if ( syncCookie.bv_len && match < 0) {
+                                               syncrepl_updateCookie( si, ld, &op, &psub, &syncCookie );
                                        }
+                                       if ( ctrl_ber )
+                                               ber_free( ctrl_ber, 1 );
+                                       goto done;
                                } else {
+                                       /* FIXME : different error behaviors according to
+                                               1) err code : LDAP_BUSY ...
+                                               2) on err policy : stop service, stop sync, retry
+                                       */
                                        if ( syncCookie.bv_len && match < 0 ) {
                                                syncrepl_updateCookie( si, ld, &op, &psub, &syncCookie);
                                        }