]> git.sur5r.net Git - openldap/commitdiff
ITS#6394 partially revert ITS#5108. Use RID_MAX, as originally designed.
authorHoward Chu <hyc@openldap.org>
Sun, 22 Nov 2009 00:08:52 +0000 (00:08 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 22 Nov 2009 00:08:52 +0000 (00:08 +0000)
servers/slapd/syncrepl.c

index a9b3d7150bf5231a4ea035c4845da4cadfe1395c..703fe25a6bb5c096177387df6d4ce337406fbccb 100644 (file)
@@ -4027,10 +4027,10 @@ parse_syncrepl_line(
                                Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 );
                                return -1;
                        }
-                       if ( tmp > SLAP_SYNC_SID_MAX || tmp < 0 ) {
+                       if ( tmp > SLAP_SYNC_RID_MAX || tmp < 0 ) {
                                snprintf( c->cr_msg, sizeof( c->cr_msg ),
                                        "Error: parse_syncrepl_line: "
-                                       "syncrepl id %d is out of range [0..4095]", tmp );
+                                       "syncrepl id %d is out of range [0..%d]", tmp, SLAP_SYNC_RID_MAX );
                                Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 );
                                return -1;
                        }
@@ -4555,7 +4555,7 @@ syncrepl_unparse( syncinfo_t *si, struct berval *bv )
        si->si_bindconf.sb_version = LDAP_VERSION3;
 
        ptr = buf;
-       assert( si->si_rid >= 0 && si->si_rid <= SLAP_SYNC_SID_MAX );
+       assert( si->si_rid >= 0 && si->si_rid <= SLAP_SYNC_RID_MAX );
        len = snprintf( ptr, WHATSLEFT, IDSTR "=%03d " PROVIDERSTR "=%s",
                si->si_rid, si->si_bindconf.sb_uri.bv_val );
        if ( len >= sizeof( buf ) ) return;