First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 131603
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Andrej Kacian (RETIRED) <ticho@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Simon Ruggier <Simon80@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
obexftp-cablewriteretry.patch obexftp-cablewriteretry.patch patch Simon Ruggier 2006-04-28 13:20 0000 2.64 KB Details | Diff
obexftp-0.18.ebuild obexftp-0.18.ebuild text/plain Simon Ruggier 2006-04-28 13:22 0000 1.23 KB Details
obexftp-0.19.ebuild obexftp-0.19.ebuild text/plain Simon Ruggier 2006-04-28 13:23 0000 1.27 KB Details
obexftp-0.19-cobex_write.patch obexftp-0.19-cobex_write.patch patch Alin Năstac 2006-04-29 11:19 0000 2.24 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 131603 depends on: Show dependency tree
Bug 131603 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-04-28 13:19 0000
I had trouble sending files to my phone where 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.

------- Comment #1 From Simon Ruggier 2006-04-28 13:20:52 0000 -------
Created an attachment (id=85692) [edit]
obexftp-cablewriteretry.patch

This will apply cleanly to 0.18 as well as 0.19

------- Comment #2 From Simon Ruggier 2006-04-28 13:22:51 0000 -------
Created an attachment (id=85693) [edit]
obexftp-0.18.ebuild

------- Comment #3 From Simon Ruggier 2006-04-28 13:23:31 0000 -------
Created an attachment (id=85695) [edit]
obexftp-0.19.ebuild

------- Comment #4 From Alin Năstac 2006-04-29 08:32:32 0000 -------
100 tries seems a bit much and also you didn't took into account the fact that
write() could always return 0 (which IMO is an error by itself). 
I will change the patch in such way to abort after 3 _consecutive_ errors. That
sounds OK?

------- Comment #5 From Simon Ruggier 2006-04-29 10:22:04 0000 -------
(In reply to comment #4)
> 100 tries seems a bit much and also you didn't took into account the fact that
> write() could always return 0 (which IMO is an error by itself). 
> I will change the patch in such way to abort after 3 _consecutive_ errors. That
> sounds OK?
> 

The reason I set it to 100 was to make sure that transfers don't fail because
of "Resource temporarily unavailable" errors, which is quite possible if the
fail threshold is less than 5 errors.  Making it consecutive would alleviate
that issue, but I don't think making the number high is a problem, cause worst
case, the loop would run for less than 5 secs if it encountered 100 write()
errors (based on my highly unscientific observations), and this is an unlikely
circumstance.  I tried to unplug my phone during a transfer a few times to
trigger it, and it didn't happen, the connection was terminated and obexftp
promptly closed.  Also, failing this, there still is the option for the user to
send an interrupt to the program, which would terminate it immediately.  Even
if you make it keep track of consecutive errors, which is a good thing, my
opinion is that the fail threshold should be set significantly higher than 3.

------- Comment #6 From Alin Năstac 2006-04-29 11:19:53 0000 -------
Created an attachment (id=85776) [edit]
obexftp-0.19-cobex_write.patch

Please try this patch.

------- Comment #7 From Alin Năstac 2006-05-02 01:04:03 0000 -------
well, does it work for you?

------- Comment #8 From Simon Ruggier 2006-05-03 08:41:28 0000 -------
Hey, sorry about the delay, I've been busy in the past few days, moving to
school, etc., and haven't checked my email.  I'll try to remember to try it
tonight.

------- Comment #9 From Simon Ruggier 2006-05-04 13:53:20 0000 -------
Seems to work, which I would expect, given its similarity to the original
working patch.  I've tested a 9kB HTML file as well as a 3888kB file.

------- Comment #10 From Alin Năstac 2006-05-05 23:08:34 0000 -------
fixed in 0.19-r1.
thanks!

First Last Prev Next    No search results available      Search page      Enter new bug