a900 filesystem
Aaron Z <[email protected]>
| Newsgroups | gmane.comp.mobile.bitpim.devel |
|---|---|
| Message-ID | <[email protected]> |
I've been reading Aaron and Stephen's conversation on the A900; I think the problem is that reading a 'pascal' string from the buffer is assuming a one-byte length, and the a900's listdirectoryresponse packet is returning a two-byte string length, for example: > 00000000 59 0a 00 00 00 00 00 01 00 00 00 47 47 c6 00 07 Y..........GG... > 00000010 00 00 00 30 de 63 03 01 00 05 2f 62 72 65 77 ...0.c..../brew By running bitpim under eclipse/pydev, this parses as follows: header: 59 0a 00 entrynumber: 00 00 00 00 unknown1: 01 00 00 00 47 47 c6 00 07 00 00 00 30 de 63 03 01 subdir: [should be] 00 05 2f 62 72 65 77 ... but subdir.readfrombuffer() sees a length of 0, not of 5, and dies right there. So we get into this loop where we try to parse a bunch of subdirs named '' (empty string), which is just the root dir all over again. Other-Aaron, you can temporarily fix this in your copy of bitpim by reading two length bytes instead of one -- at prototype.py, line 341, dup the self._sizeinbytes line. This just throws away the first byte, of course, but for the moment, it'll do. Once I did this, I read the filesystem beautifully, save for a double exception when I try to read the .$ directory. I ignored this and bitpim continued to run, so I didn't debug it further. I, too, would love to sync my calendar with bitpim. Now that we've gotten this far, Stephen, what's next? ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642