diff options
author | Vladimir Davydov <vladimir.davydov@promwad.com> | 2010-06-30 16:21:19 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2010-06-30 17:38:07 +0300 |
commit | c637b9ba67b0dc17968e272f088c86b86d896d03 (patch) | |
tree | bbad65faeee3362e79d67cd4ff46ba95024461f3 /tools | |
parent | 65c9310f96fa78980196002fdf11e8d30b4fe6b6 (diff) | |
download | bluez-c637b9ba67b0dc17968e272f088c86b86d896d03.tar.gz |
hciattach: Fix the timeout handling code
The variable 'retries' should be defined as static, or it will be always
0.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/hciattach.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/hciattach.c b/tools/hciattach.c index b13db1b6..e772b6f3 100644 --- a/tools/hciattach.c +++ b/tools/hciattach.c @@ -326,7 +326,8 @@ static int bcsp_max_retries = 10; static void bcsp_tshy_sig_alarm(int sig) { unsigned char bcsp_sync_pkt[10] = {0xc0,0x00,0x41,0x00,0xbe,0xda,0xdc,0xed,0xed,0xc0}; - int len, retries = 0; + int len; + static int retries = 0; if (retries < bcsp_max_retries) { retries++; @@ -343,7 +344,8 @@ static void bcsp_tshy_sig_alarm(int sig) static void bcsp_tconf_sig_alarm(int sig) { unsigned char bcsp_conf_pkt[10] = {0xc0,0x00,0x41,0x00,0xbe,0xad,0xef,0xac,0xed,0xc0}; - int len, retries = 0; + int len; + static int retries = 0; if (retries < bcsp_max_retries){ retries++; |