[dev] [PATCH] ActiveSync: Fix email sync error on corner case

Thomas Jarosch thomas.jarosch at intra2net.com
Thu Dec 12 16:11:01 UTC 2013


On Thursday, 12. December 2013 10:59:57 Michael J Rubinsky wrote:
> Quoting Thomas Jarosch <thomas.jarosch at intra2net.com>:
> > This fixes the "ERR: Unknown message." error in the ActiveSync log.
> > 
> > After adding debug output the involved data structures,
> > the data looked like this:
> > 
> > 2013-12-12T12:24:24+01:00 ERR: HORDE [horde] Unknown message: uid:
> > 65298, uidnext: 78953, minuid: 65298,
> > this->messages:
> > (
> > 
> >     [65298] => 0
> >     [65299] => 1
> >     [65300] => 2
> >     [65301] => 3
> > 
> > ...
> > )
> > 
> > As the value of for $this->messages[65298] is 0, empty() will return
> > true. -> We have to use isset() for the test.
> 
> I don't think this is correct. If you are using a NON-CONDSTORE
> server, $this->_messages should contain array values, not integer
> values. It is where we store the flag state for each message in order
> to detect any flag changes. Where did you dump this value from?

good catch. I dumped the info exactly one line above the

    throw new Horde_ActiveSync_Exception('Unknown message.');

line in 

    framework/ActiveSync/lib/Horde/ActiveSync/Folder/Imap.php


Hmm. What about the array_diff() call in setSoftDeleted()?
I think it will destroy the array values.

Thomas



More information about the dev mailing list