summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-12-07 21:24:26 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-12-07 21:24:26 +0000
commit3b8deddf131599756e7fd3470b18af14e8bcc971 (patch)
tree9540f523bebfd1e8653af41f9b91263cc1ddcbf2
parent3f4eef5217c126cf27afb32c5fbb10cb08726658 (diff)
Fix bug of error responses being ignored.
-rw-r--r--audio/unix.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/audio/unix.c b/audio/unix.c
index 31e1dcb2..d9f7c670 100644
--- a/audio/unix.c
+++ b/audio/unix.c
@@ -407,6 +407,9 @@ static void a2dp_config_complete(struct avdtp *session, struct a2dp_sep *sep,
uint16_t imtu, omtu;
GSList *caps;
+ if (err)
+ goto failed;
+
memset(buf, 0, sizeof(buf));
client->req_id = 0;
@@ -465,6 +468,9 @@ static void a2dp_resume_complete(struct avdtp *session,
struct bt_streamfd_ind *ind = (void *) buf;
struct a2dp_data *a2dp = &client->d.a2dp;
+ if (err)
+ goto failed;
+
memset(buf, 0, sizeof(buf));
rsp->rsp_h.msg_h.msg_type = BT_STREAMSTART_RSP;
rsp->rsp_h.posix_errno = 0;
@@ -488,7 +494,7 @@ failed:
a2dp_sep_unlock(a2dp->sep, a2dp->session);
a2dp->sep = NULL;
}
- unix_ipc_error(client, BT_STREAMSTART_REQ, EIO);
+ unix_ipc_error(client, BT_STREAMSTART_RSP, EIO);
avdtp_unref(a2dp->session);
@@ -521,7 +527,7 @@ failed:
a2dp_sep_unlock(a2dp->sep, a2dp->session);
a2dp->sep = NULL;
}
- unix_ipc_error(client, BT_STREAMSTOP_REQ, EIO);
+ unix_ipc_error(client, BT_STREAMSTOP_RSP, EIO);
avdtp_unref(a2dp->session);