summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-04-01 21:23:15 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-04-01 21:23:15 +0000
commit02643f01b8da5fa59a1af4dfbd055f11033e353c (patch)
tree6d977ab59a3b95ec6c81e850ae7d69fe01ace3d9
parent38675f708f4d1e18fd3554a82b0cacd13c10aa16 (diff)
Fix emitting errors to already disconnected clients.
-rw-r--r--audio/unix.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/audio/unix.c b/audio/unix.c
index d81291c7..bbb58d72 100644
--- a/audio/unix.c
+++ b/audio/unix.c
@@ -163,6 +163,9 @@ static void unix_ipc_error(struct unix_client *client, int type, int err)
char buf[BT_AUDIO_IPC_PACKET_SIZE];
bt_audio_rsp_msg_header_t *rsp_hdr = (void *) buf;
+ if (!g_slist_find(clients, client))
+ return;
+
memset(buf, 0, sizeof(buf));
rsp_hdr->msg_h.msg_type = type;
rsp_hdr->posix_errno = err;