Re: Syncing with the P1i
Martin Zoller <[email protected]>
| Newsgroups | gmane.comp.horde.sync |
|---|---|
| Message-ID | <[email protected]> |
Hello I think you're right about the linebreak, Jan. But that would mean that *Horde* doesn't count it, because the higher number (153 bytes) comes from the *phone*. That's because the data already gets trimmed: In Command/Sync.php on line 225. Now that we have this explanation for the size mismatch, it wouldn't be too elegant to just accept "wrong" size specifications as in Arvid's patch. Maybe we should store the 'trimmed' and the 'untrimmed' length of the data and accept both of them? Because removing the trim() commands might break other clients. Have a nice weekend. Martin Jan Schneider wrote: > Zitat von Martin Zoller <[email protected]>: > >> Good afternoon >> >> Jan Schneider wrote: >>> Please keep discussions on the list. >> Sorry, I must have used "reply" instead of "reply all". >> >>> >>>> The thing is, I only have the *.wbxml files and they are binary. I >>>> think there is no <Data> tag there. >>> >>> You can decode them with wbxml2xml. >> OK. The sizes don't make sense to me yet. Take this item, for example: >> >> <Replace> >> <CmdID>9</CmdID> >> <Meta> >> <Type xmlns="syncml:metinf">text/x-vcard</Type> >> <Size xmlns="syncml:metinf">153</Size> >> </Meta> >> <Item> >> <Source> >> <LocURI>59</LocURI> >> </Source> >> <Meta> >> <Type xmlns="syncml:metinf">text/x-vcard</Type> >> </Meta> >> <Data><![CDATA[BEGIN:VCARD >> VERSION:2.1 >> REV:20090910T144434Z >> UID:14ecf97979509240-00e1365b3ef3b7c5-425 >> N:Westman;Aron;;; >> TEL;WORK;VOICE;CELL:0733665130 >> END:VCARD >> ]]></Data> >> </Item> >> </Replace> >> >> There are 165 bytes between <Data> and </Data>. >> The <Size> tag specifies the size as 153. In log.txt it says: >> ERR: Item size mismatch. Size reported as 153 but actual size is 151 >> So I guess the <![CDATA[ ]]> tags are not counted? Because if you count >> only the actual VCARD data (including BEGIN:VCARD and END:VCARD), you >> get exactly 151 bytes. > > The CDATA is part of the XML markup, so 153 is correct. My guess is > that the phone doesn't count the trailing line break. Trimming the > <Data> content would probably fix that, but I'm afraid that might > break other clients. > > Jan. > -- sync mailing list - Join the hunt: http://horde.org/bounties/#sync Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]