Skip to contentSkip to conversation

Small bugfix for dund

Bluez-devel Ludovic Drolez 2 participants 2 messages Feb 13, 2007 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi !

Sometimes, dund fails with the following error:
dund[15658]: RFCOMM TTY creation failed. No such file or directory(2)

That's because, udev does not have the time to create the device. I've found in dund's code that dund waits, at most, 30*100us for the device to become readable. I think that the author made a typo here, and that 30*100ms is much more appropriate (see the patch below).

Cheers,

Ludovic.

========= patch

dund/dun.c +1 -1
@@ -213,7 +213,7 @@
                if (stat(tty, &st) < 0) {
                        snprintf(tty, size, "/dev/rfcomm%d", id);
                        if (try--) {
-                               usleep(100);
+                               usleep(100000);
                                continue;
                        }
 

======== end patch

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#1 lore raw

Hi Ludovic,

Quoted 7 lines

Sometimes, dund fails with the following error:
dund[15658]: RFCOMM TTY creation failed. No such file or directory(2)

That's because, udev does not have the time to create the device. I've found in dund's code that dund waits, at most, 30*100us for the device to become readable. I think that the author made a typo here, and that 30*100ms is much more appropriate (see the patch below).

same issue is in rfcomm/main.c. I fixed both now. Thanks.

Regards

Marcel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel