Commit c7ef49c8 authored by Ondřej Kuzník's avatar Ondřej Kuzník
Browse files

ITS#8116 Fix handling of syncinfo intermediate message

parent c351616c
......@@ -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 );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment