[sync] ActiveSync issues

Michael J Rubinsky mrubinsk at horde.org
Tue Aug 13 00:21:21 UTC 2013


Quoting Ivan kouvykov <ivan at kouvykov.com>:


>
> It turned out that my box CPU is big-endian while data in blob is  
> little-endian. Once I changed endianness in unpack format calendars  
> started syncing.

So, did you do something like this in php?

function isLittleEndian() {
     $testint = 0x00FF;
     $p = pack('S', $testint);
     return $testint===current(unpack('v', $p));
}


function chbo($num) {
     $data = dechex($num);
     if (strlen($data) <= 2) {
         return $num;
     }
     $u = unpack("H*", strrev(pack("H*", $data)));
     $f = hexdec($u[1]);
     return $f;
}

if (!isLittleEndian()) {
   $data = chbo($timezoneblob)?
}

If not, how did you change endianness so I can add it upstream....
-- 
mike

The Horde Project (www.horde.org)
mrubinsk at horde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 2200 bytes
Desc: PGP Public Key
URL: <http://lists.horde.org/archives/sync/attachments/20130812/4637eb34/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6062 bytes
Desc: S/MIME Signature
URL: <http://lists.horde.org/archives/sync/attachments/20130812/4637eb34/attachment-0003.bin>


More information about the sync mailing list