mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-17 17:24:32 +08:00
Change delay to milliseconds and check count
This commit is contained in:
parent
ec29dc02fc
commit
e667307121
@ -586,7 +586,7 @@ static void send_mode(int sk)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (num_frames && delay && !(seq % count))
|
||||
if (num_frames && delay && count && !(seq % count))
|
||||
usleep(delay);
|
||||
}
|
||||
|
||||
@ -618,7 +618,7 @@ static void senddump_mode(int sk)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (num_frames && delay && !(seq % count))
|
||||
if (num_frames && delay && count && !(seq % count))
|
||||
usleep(delay);
|
||||
}
|
||||
|
||||
@ -695,7 +695,7 @@ static void usage(void)
|
||||
"\t[-N num] send num frames (default = infinite)\n"
|
||||
"\t[-L seconds] enable SO_LINGER\n"
|
||||
"\t[-C num] send num frames before delay (default = 1)\n"
|
||||
"\t[-D seconds] delay after sending num frames (default = 0)\n"
|
||||
"\t[-D milliseconds] delay after sending num frames (default = 0)\n"
|
||||
"\t[-R] reliable mode\n"
|
||||
"\t[-G] use connectionless channel (datagram)\n"
|
||||
"\t[-F] enable flow control\n"
|
||||
@ -791,7 +791,7 @@ int main(int argc ,char *argv[])
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
delay = atoi(optarg) * 1000000;
|
||||
delay = atoi(optarg) * 1000;
|
||||
break;
|
||||
|
||||
case 'R':
|
||||
|
@ -351,7 +351,7 @@ static void send_mode(int sk)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (num_frames && delay && !(seq % count))
|
||||
if (num_frames && delay && count && !(seq % count))
|
||||
usleep(delay);
|
||||
}
|
||||
|
||||
@ -409,7 +409,7 @@ static void usage(void)
|
||||
"\t[-L seconds] enabled SO_LINGER option\n"
|
||||
"\t[-N num] number of frames to send\n"
|
||||
"\t[-C num] send num frames before delay (default = 1)\n"
|
||||
"\t[-D seconds] delay after sending num frames (default = 0)\n"
|
||||
"\t[-D milliseconds] delay after sending num frames (default = 0)\n"
|
||||
"\t[-A] request authentication\n"
|
||||
"\t[-E] request encryption\n"
|
||||
"\t[-S] secure connection\n"
|
||||
@ -506,7 +506,7 @@ int main(int argc ,char *argv[])
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
delay = atoi(optarg) * 1000000;
|
||||
delay = atoi(optarg) * 1000;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user