[horde] ActiveSync Problem with HTC Device

Michael J Rubinsky mrubinsk at horde.org
Mon Sep 9 14:52:18 UTC 2013

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:



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/b6cc6e77/attachment-0001.bin>

More information about the horde mailing list