Re: O_NONBLOCK in irmc

Phil Dibowitz <[email protected]> Sun, 01 Aug 2004 01:39:10 -0700
Newsgroups gmane.comp.gnome.apps.multisync.devel
Message-ID <[email protected]>
Phil Dibowitz wrote:
> Unfortunately the DCU-11 cable that connects the phone is a USB to 
> Serial converter, and the phone acts as a basic serial device taking AT 
> commands.
> 
> Therefore multisync writes some data, and then tries a few times to 
> write more data but fails and therefore gives up.

I managed to "work around" this by adding a "sleep" in obex_cable_write.

I was uber-conservative the first time and did a sleep(30) just before 
the close of the while() loop. This obviously took a very long time 
(sleep for 30 seconds after each write), but it WORKED! I've dropped it 
down to 5 and am recompiling now.

This is probably much less than an ideal solution, but hopefully it'll 
help those more familiar with the codebase come up with a cleaner solution.

-- 
Phil Dibowitz                             [email protected]
Freeware and Technical Pages              Insanity Palace of Metallica
http://www.phildev.net/                   http://www.ipom.com/

"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
  - Benjamin Franklin, 1759
signature.asc (application/pgp-signature, 256 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBDKwuN5XoxaHnMrsRAvMTAKCZIPOIkCJOZ1kOwkTGsUpejwBY+ACZAc/w
SXZqH5OkbPfwNz30UEQzR0o=
=6VHv
-----END PGP SIGNATURE-----