summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2003-03-17 09:06:19 +0000
committerMarcel Holtmann <marcel@holtmann.org>2003-03-17 09:06:19 +0000
commita8b6c0b9d190457f40f30147fe70ef0f8467a60b (patch)
tree380a7cc04ee4b99406ca743bf727da8bcef649e3 /tools
parentc7c04aac86fec5084e3e1caf3eaaa3abd545f58d (diff)
Flush the serial buffer before quit in BCSP initialization
Diffstat (limited to 'tools')
-rw-r--r--tools/hciattach.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/hciattach.c b/tools/hciattach.c
index 0131dcb6..6959a006 100644
--- a/tools/hciattach.c
+++ b/tools/hciattach.c
@@ -323,6 +323,7 @@ static void bcsp_tshy_sig_alarm(int sig)
alarm(1);
return;
}
+ tcflush(serial_fd, TCIOFLUSH);
fprintf(stderr, "BCSP initialization timed out\n");
exit(1);
}
@@ -337,6 +338,7 @@ static void bcsp_tconf_sig_alarm(int sig)
alarm(1);
return;
}
+ tcflush(serial_fd, TCIOFLUSH);
fprintf(stderr, "BCSP initialization timed out\n");
exit(1);
}