]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Yet another fix to working with old versions.
authorTimo Sirainen <tss@iki.fi>
Mon, 28 Apr 2014 21:53:01 +0000 (00:53 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 28 Apr 2014 21:53:01 +0000 (00:53 +0300)
src/doveadm/dsync/dsync-ibc-stream.c

index 5a4472b0fe898436aa399f5e41db36da4a0b70bc..65252d168147ba3eb3748c4d4571569c71124607 100644 (file)
@@ -850,8 +850,8 @@ dsync_ibc_stream_recv_mailbox_state(struct dsync_ibc *_ibc,
                dsync_ibc_input_error(ibc, decoder, "Invalid last_common_pvt_modseq");
                return DSYNC_IBC_RECV_RET_TRYAGAIN;
        }
-       value = dsync_deserializer_decode_get(decoder, "last_messages_count");
-       if (str_to_uint32(value, &state_r->last_messages_count) < 0) {
+       if (dsync_deserializer_decode_try(decoder, "last_messages_count", &value) &&
+           str_to_uint32(value, &state_r->last_messages_count) < 0) {
                dsync_ibc_input_error(ibc, decoder, "Invalid last_messages_count");
                return DSYNC_IBC_RECV_RET_TRYAGAIN;
        }