summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-07-06 10:58:43 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-07-06 10:58:43 +0000
commitb0f139af155d04ef8c399e77e89707af98441693 (patch)
tree99ea41bb00e24a6024c3b0492c820965b25208ae
parentbe06891a834058b45fdc89c8a939c07fe4c23527 (diff)
Sleep only 100 msecs for device detection
-rw-r--r--dund/dun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dund/dun.c b/dund/dun.c
index b1ba8380..4fbbad69 100644
--- a/dund/dun.c
+++ b/dund/dun.c
@@ -182,7 +182,7 @@ static int dun_create_tty(int sk, char *tty, int size)
struct sockaddr_rc sa;
struct stat st;
socklen_t alen;
- int id, try = 3;
+ int id, try = 30;
struct rfcomm_dev_req req = {
flags: (1 << RFCOMM_REUSE_DLC) | (1 << RFCOMM_RELEASE_ONHUP),
@@ -210,7 +210,7 @@ static int dun_create_tty(int sk, char *tty, int size)
if (stat(tty, &st) < 0) {
snprintf(tty, size, "/dev/rfcomm%d", id);
if (try--) {
- sleep(1);
+ usleep(100);
continue;
}