diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 4fd08f1728..543c6cefba 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -1797,7 +1797,7 @@ static void print_syncinfo( ber_init2( syncinfo, data, 0 ); printf(_("# SyncInfo Received: ")); - tag = ber_skip_tag( syncinfo, &len ); + tag = ber_peek_tag( syncinfo, &len ); switch (tag) { case LDAP_TAG_SYNC_NEW_COOKIE: { printf(_("new cookie\n")); @@ -1821,7 +1821,11 @@ static void print_syncinfo( } break; case LDAP_TAG_SYNC_REFRESH_DELETE: { ber_int_t done = 1; + printf(_("refresh delete\n")); + /* Skip sequence tag first */ + ber_skip_tag( syncinfo, &len ); + tag = ber_peek_tag( syncinfo, &len ); if ( tag == LDAP_TAG_SYNC_COOKIE ) { ber_scanf( syncinfo, "m", &cookie ); @@ -1852,7 +1856,11 @@ static void print_syncinfo( } break; case LDAP_TAG_SYNC_REFRESH_PRESENT: { ber_int_t done = 1; + printf(_("refresh present\n")); + /* Skip sequence tag first */ + ber_skip_tag( syncinfo, &len ); + tag = ber_peek_tag( syncinfo, &len ); if ( tag == LDAP_TAG_SYNC_COOKIE ) { ber_scanf( syncinfo, "m", &cookie ); @@ -1886,6 +1894,9 @@ static void print_syncinfo( BerVarray uuids; printf(_("ID Set\n")); + /* Skip sequence tag first */ + ber_skip_tag( syncinfo, &len ); + tag = ber_peek_tag( syncinfo, &len ); if ( tag == LDAP_TAG_SYNC_COOKIE ) { ber_scanf( syncinfo, "m", &cookie );