obexftp hangs when sending file to Sony Ericsson z520 over usb cable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
obexftp (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Whenever I've tried to send files to my phone, it would hang at the 'Sending "<file>".../' line, so I tracked down the issue and wrote a patch for it.
It looks like one could consider this a workaround for fixing the relevant driver itself ( I haven't bothered to figure this out), but my patch just adds a retry loop to the function that writes data to the cable driver, which was failing because the write() call was only writing part of what was requested. Should be completely safe from infinite looping, but if I'm wrong (say write
perpetually returns 0, if that's even possible), the results are not catastrophic by any means, because there's a usleep(1) call in the loop as part
of the workaround. So in short, applying this patch can only be good, and may perhaps fix issues with more than just my specific model of phone. It applies cleanly to obexftp-0.18 and obex-ftp0.19, but I would guess that it can be manually applied to 0.10 if desired. I'm submitting it here because I use Ubuntu and would like to improve it.
description: | updated |
The patch in question