mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-17 01:04:40 +08:00
Make abort requests to have a shorter timeout
Regular request takes 4 secs to timeout, but this may be too long to wait for abort command so it is now reduced to 2 secs.
This commit is contained in:
parent
43830baea4
commit
abe8bb2d3b
@ -88,6 +88,7 @@
|
||||
#define AVDTP_MSG_TYPE_REJECT 0x03
|
||||
|
||||
#define REQ_TIMEOUT 4
|
||||
#define ABORT_TIMEOUT 2
|
||||
#define DISCONNECT_TIMEOUT 1
|
||||
#define STREAM_TIMEOUT 20
|
||||
|
||||
@ -2558,7 +2559,8 @@ static int send_req(struct avdtp *session, gboolean priority,
|
||||
|
||||
session->req = req;
|
||||
|
||||
req->timeout = g_timeout_add_seconds(REQ_TIMEOUT,
|
||||
req->timeout = g_timeout_add_seconds(req->signal_id == AVDTP_ABORT ?
|
||||
ABORT_TIMEOUT : REQ_TIMEOUT,
|
||||
request_timeout,
|
||||
session);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user