Skip to content

Commit f7c6ed2

Browse files
committed
emsmdb: emit anti-SyncMessagePartial marker into messageChangePartial ICS elements
References: GXL-624, DESK-3529
1 parent 92c4c02 commit f7c6ed2

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

exch/emsmdb/ftstream_producer.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,9 +692,30 @@ BOOL fxstream_producer::write_messagechangepartial(
692692
for (size_t i = 0; i < pmsg->count; ++i) {
693693
if (!write_uint32(MetaTagIncrementalSyncMessagePartial))
694694
return FALSE;
695+
/*
696+
* [Grep keyword: FAULTY-PARTIALS]. Earlier in
697+
* icsdownctx_object_get_changepartial(), ungrouped tags were
698+
* put into the special (struct MSGCHG_PARTIAL::pchanges)
699+
* pseudo-group with id UINT32_MAX/0xffffffff. pmsg->pgpinfo
700+
* does not have any group with id 0xffffffff, and OL would
701+
* rightfully deleted ungrouped properties from an .ost.
702+
*
703+
* OXCFXICS has terrible explanations, but it appears very much
704+
* like we are supposed to use a proptag terminator instead
705+
* (see below).
706+
*/
695707
if (!write_uint32(pmsg->pchanges[i].group))
696708
return FALSE;
697709
for (const auto &ipv : pmsg->pchanges[i].proplist) {
710+
/*
711+
* When we are in our special group (of ungrouped tags),
712+
* emit the marker for "terminating" SyncMessagePartial,
713+
* as per OXCFXICS v25 2.2.4.3.15.
714+
*/
715+
if (pmsg->pchanges[i].group == UINT32_MAX) {
716+
if (!write_uint32(UINT32_MAX))
717+
return FALSE;
718+
}
698719
switch (ipv.proptag) {
699720
case PR_MESSAGE_RECIPIENTS:
700721
if (pmsg->children.prcpts == nullptr)

exch/emsmdb/icsdownctx_object.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,8 @@ static BOOL icsdownctx_object_get_changepartial(icsdownctx_object *pctx,
680680
}
681681
if (ugrp_tags.empty())
682682
return TRUE;
683+
684+
/* Special "group" for write_messagechangepartial(). */
683685
auto &pl = pmsg->pchanges[i].proplist;
684686
pmsg->pchanges[i].group = UINT32_MAX;
685687
pl.ppropval = cu_alloc<TAGGED_PROPVAL>(ugrp_tags.size());

0 commit comments

Comments
 (0)