[horde] ActiveSync Problem with HTC Device

Michael J Rubinsky mrubinsk at horde.org
Mon Sep 9 18:55:58 UTC 2013

Quoting Michael J Rubinsky <mrubinsk at horde.org>:

> Quoting lst_hoe02 at kwsoft.de:
>> Zitat von Michael J Rubinsky <mrubinsk at horde.org>:
>>> Quoting lst_hoe02 at kwsoft.de:
>>>> Zitat von Michael J Rubinsky <mrubinsk at horde.org>:
>>>>> Quoting lst_hoe02 at kwsoft.de:
>>>>>> Hello,
>>>>>> i could sent you the whole log (compressed 7z ~2,5MBtye) in  
>>>>>> private mail as it is from the whole night and the HTC is  
>>>>>> really busy syncing :-(
>>>>> Sure, not a problem.
>>>> Okay, here we go. As said i have "reset" the device assignment in  
>>>> the administrator console to force a resync but i'm not sure if  
>>>> the device has understand the intention. Is there BTW a  
>>>> recommended APP for Android in cases where the built-in  
>>>> ActiveSync is buggy.
>>> My best guess is that this is an integer overrun error on the  
>>> client. It looks like it is interpreting the FOLDERID element as  
>>> an integer, and not as a string as the specs say it is. I'm going  
>>> to look into changing the folderid generation to add a  
>>> non-numeric/hex character and see if that changes anything.
>>> Can you try the following to test my theory and see what happens?
>>> In the file {your pear_directory}/Horde/ActiveSync/Driver/Base.php:
>>> change line 357 from:
>>>           $this->_tempMap[$imap] = sprintf('%04x%04x', mt_rand(0,  
>>> 0xffff), mt_rand(0, 0xffff));
>>> to (note the addition of the nonsensical 'z:' text to the generated id):
>>>           $this->_tempMap[$imap] = sprintf('z:%04x%04x',  
>>> mt_rand(0, 0xffff), mt_rand(0, 0xffff));
>>> Then, remove the account from the device and recreate.
>> Okay, now with the patch and a recreated account. But it doesn't  
>> look much better i'm afraid :-(
> Ok. I spend some time and distilled the log file into the minimum  
> needed to see what was happening. The very first appearance of the  
> -1 value is from the HTC client in the first (premature) PING  
> request. My (new) guess is that since the PING request is issued  
> before all the initial SYNC requests are issued, the client does not  
> have all the folder/collection information in it's database so the  
> -1 leaks into the PING request. PING requests are forbidden from  
> being issued by the protocol until all initial SYNC requests are  
> complete and the client knows the folderid and synckey for each  
> collections.
> I added some code to remove collections requested by the client that  
> the server does not know about. Please let me know if this helps.
> The pertinent changes are here:
> https://github.com/horde/horde/commit/0fa5b22537e55728862b83d1f3d4f70cc0c7731d

Actually, nevermind. The fix for this would break normal synching for  
clients that actually do follow the spec. I really don't see a way to  
work around this, you'll just have to find a non-broken client. :(

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/horde/attachments/20130909/5d19e0eb/attachment-0001.bin>

More information about the horde mailing list