audio/avdtp: Fix added first endpoints 55/51755/1
authorBharat Panda <bharat.panda@samsung.com>
Fri, 13 Nov 2015 13:24:19 +0000 (18:54 +0530)
committerBharat Panda <bharat.panda@samsung.com>
Fri, 13 Nov 2015 13:24:19 +0000 (18:54 +0530)
This resolves suspending and resuming only the first SEID.
Changes taken only for linux bluez, excluded android part of fix.

AVDTP_Start can contain several Stream Endpoing IDs to be resumed.
AVDTP_Suspend can contain several Stream Endpoing IDs to be suspended.

git repo link:
http://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=b5c6b1ed97ee6fe03092223c5f4ba8800a186519
http://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=302e4163f39e87fe6ab951bc2e2eb322b43ed6cd

Change-Id: I5f63eeae8b901d39782855205aad00b34b32a762

profiles/audio/avdtp.c

index aba2d03..481991e 100644 (file)
@@ -1932,8 +1932,7 @@ static gboolean avdtp_start_cmd(struct avdtp *session, uint8_t transaction,
        for (i = 0; i < seid_count; i++, seid++) {
                failed_seid = seid->seid;
 
-               sep = find_local_sep_by_seid(session,
-                                       req->first_seid.seid);
+               sep = find_local_sep_by_seid(session, seid->seid);
                if (!sep || !sep->stream) {
                        err = AVDTP_BAD_ACP_SEID;
                        goto failed;
@@ -2044,8 +2043,7 @@ static gboolean avdtp_suspend_cmd(struct avdtp *session, uint8_t transaction,
        for (i = 0; i < seid_count; i++, seid++) {
                failed_seid = seid->seid;
 
-               sep = find_local_sep_by_seid(session,
-                                       req->first_seid.seid);
+               sep = find_local_sep_by_seid(session, seid->seid);
                if (!sep || !sep->stream) {
                        err = AVDTP_BAD_ACP_SEID;
                        goto failed;