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

Michael J Rubinsky mrubinsk at horde.org
Thu Dec 12 15:59:57 UTC 2013


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?

> ---
>  framework/ActiveSync/lib/Horde/ActiveSync/Folder/Imap.php | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git  
> a/framework/ActiveSync/lib/Horde/ActiveSync/Folder/Imap.php  
> b/framework/ActiveSync/lib/Horde/ActiveSync/Folder/Imap.php
> index e4b14ff..e067a1b 100644
> --- a/framework/ActiveSync/lib/Horde/ActiveSync/Folder/Imap.php
> +++ b/framework/ActiveSync/lib/Horde/ActiveSync/Folder/Imap.php
> @@ -104,7 +104,7 @@ class Horde_ActiveSync_Folder_Imap extends  
> Horde_ActiveSync_Folder_Base implemen
>                  if ($this->modseq() > 0) {
>                      $this->_changed[] = $uid;
>                  } else {
> -                    if (empty($this->_messages[$uid])) {
> +                    if (!isset($this->_messages[$uid])) {
>                          // Do not know about this message
>                          throw new  
> Horde_ActiveSync_Exception('Unknown message.');
>                      }
> --
> 1.7.11.7
>
> --
> dev mailing list
> Frequently Asked Questions: http://wiki.horde.org/FAQ
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org


-- 
mike

The Horde Project (www.horde.org)
mrubinsk at horde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5849 bytes
Desc: S/MIME Signature
URL: <http://lists.horde.org/archives/dev/attachments/20131212/3e3f5d88/attachment.bin>


More information about the dev mailing list