mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2025-01-23 12:54:10 +08:00
Change default poll() timeout
This commit is contained in:
parent
876bfd3a0d
commit
35e9349ffc
@ -318,7 +318,7 @@ int epox_presenter(const bdaddr_t *src, const bdaddr_t *dst, uint8_t channel)
|
||||
|
||||
while (!__io_canceled) {
|
||||
p.revents = 0;
|
||||
if (poll(&p, 1, 100) < 1)
|
||||
if (poll(&p, 1, 500) < 1)
|
||||
continue;
|
||||
|
||||
len = read(sk, buf, sizeof(buf));
|
||||
|
@ -340,7 +340,7 @@ static void run_server(int ctl, int csk, int isk, uint8_t subclass, int nosdp, i
|
||||
p[0].revents = 0;
|
||||
p[1].revents = 0;
|
||||
|
||||
err = poll(p, 2, 100);
|
||||
err = poll(p, 2, 500);
|
||||
if (err <= 0)
|
||||
continue;
|
||||
|
||||
|
@ -383,7 +383,7 @@ static void cmd_connect(int ctl, int dev, bdaddr_t *bdaddr, int argc, char **arg
|
||||
|
||||
while (!__io_canceled) {
|
||||
p.revents = 0;
|
||||
if (poll(&p, 1, 100))
|
||||
if (poll(&p, 1, 500))
|
||||
break;
|
||||
}
|
||||
|
||||
@ -501,7 +501,7 @@ static void cmd_listen(int ctl, int dev, bdaddr_t *bdaddr, int argc, char **argv
|
||||
|
||||
while (!__io_canceled) {
|
||||
p.revents = 0;
|
||||
if (poll(&p, 1, 100))
|
||||
if (poll(&p, 1, 500))
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1128,7 +1128,7 @@ static int run_proxy(int fd, int dev, bdaddr_t *bdaddr)
|
||||
while (!__io_canceled) {
|
||||
p[0].revents = 0;
|
||||
p[1].revents = 0;
|
||||
err = poll(p, 2, 100);
|
||||
err = poll(p, 2, 500);
|
||||
if (err < 0)
|
||||
break;
|
||||
if (!err)
|
||||
|
@ -646,7 +646,7 @@ static void connect_mode(char *svr)
|
||||
|
||||
while (1) {
|
||||
p.revents = 0;
|
||||
if (poll(&p, 1, 100))
|
||||
if (poll(&p, 1, 500))
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -380,7 +380,7 @@ static void cmd_loopback(int ctl, bdaddr_t *bdaddr, int argc, char **argv)
|
||||
|
||||
while (!__io_canceled) {
|
||||
p.revents = 0;
|
||||
if (poll(&p, 1, 100))
|
||||
if (poll(&p, 1, 500))
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1265,7 +1265,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
while (!__io_canceled) {
|
||||
p.revents = 0;
|
||||
if (poll(&p, 1, 100))
|
||||
if (poll(&p, 1, 500))
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user