From: Jong Hyuk Choi Date: Thu, 18 Sep 2003 06:04:28 +0000 (+0000) Subject: error behavior fix and TODO X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~708 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f6d883d9014d97e7d3b0bb1681576f79a03d9eab;p=openldap error behavior fix and TODO --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index a175a34999..120c0aad06 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -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); }