2007-09-28 11:25:23

by Fabien Chevalier

[permalink] [raw]
Subject: [PATCH] Allows sink.c to know why the stream setup failed

Hi All,

This is my second patch towards the way of solving cross a2dp connect
issues.
The reason to be of this patch is to move the l2cap connection request
error code up the call stack (the error code was previously lost around
the way) :-(.

Basically i intent to use this knowledge to be a bit more clever at the
sink level, and be able to better handle errors due to cross l2cap
channel connections, instead of just bailing out with a "stream setup
failed" exception.

With this patch, i now get in the log:

Sep 28 13:00:30 tannat audio[23889]: avdtp_ref(0x8066d88): ref=2
Sep 28 13:00:30 tannat audio[23889]: a2dp_source_request_stream:
selected SEP 0x8066200
Sep 28 13:00:30 tannat audio[23889]: avdtp_ref(0x8066d88): ref=3
Sep 28 13:00:30 tannat audio[23889]: stream creation in progress
Sep 28 13:00:51 tannat audio[23889]: connect(): Host is down (112)
Sep 28 13:00:51 tannat audio[23889]: avdtp_unref(0x8066d88): ref=2
Sep 28 13:00:51 tannat audio[23889]: Stream setup failed : Host is down
Sep 28 13:00:51 tannat audio[23889]: avdtp_unref(0x8066d88): ref=1
Sep 28 13:00:51 tannat audio[23889]: avdtp_unref(0x8066d88): ref=0
Sep 28 13:00:51 tannat audio[23889]: avdtp_unref(0x8066d88): freeing
session and removing from list

Next patch will be the real cross connect fix that uses those error code
values.

Could you guys have a look ?

Regards,

Fabien


Attachments:
avdtp-error-codes-up-the-call-stack.patch (13.38 kB)
fchevalier.vcf (253.00 B)
Download all attachments

2007-09-28 13:47:35

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] Allows sink.c to know why the stream setup failed

Hi Fabien,

On Fri, Sep 28, 2007, Fabien Chevalier wrote:
> Thanks to Johan review, this is an updated version of the patch.

Looks good now. Commited to CVS.

Johan