diff options
author | Luiz Augusto Von Dentz <luiz.dentz-von@nokia.com> | 2010-03-24 23:26:24 +0200 |
---|---|---|
committer | Luiz Augusto Von Dentz <luiz.dentz-von@nokia.com> | 2010-03-24 23:32:24 +0200 |
commit | abe8bb2d3b423f0271c8713025a656822250173e (patch) | |
tree | 473eede86cb30bacbe6884fa4e805e2be46eb69f | |
parent | 43830baea480f5b1b678b33d1445d80802f20cde (diff) | |
download | bluez-abe8bb2d3b423f0271c8713025a656822250173e.tar.gz |
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.
-rw-r--r-- | audio/avdtp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/audio/avdtp.c b/audio/avdtp.c index 905830316..4e5ff1422 100644 --- a/audio/avdtp.c +++ b/audio/avdtp.c @@ -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; |