summaryrefslogtreecommitdiffstats
path: root/audio/pcm_bluetooth.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-07-10 13:34:57 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-07-10 13:34:57 +0000
commit66d48b0ac25c85de354f26782a377d0ad91bd322 (patch)
tree973a2c30fa6609a8fa10b7d99c150ef476f7b142 /audio/pcm_bluetooth.c
parentdf235d1f395b10654024979180c778777bd50c71 (diff)
Code cleanup.
Diffstat (limited to 'audio/pcm_bluetooth.c')
-rw-r--r--audio/pcm_bluetooth.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/audio/pcm_bluetooth.c b/audio/pcm_bluetooth.c
index 71daab4f..92d0383c 100644
--- a/audio/pcm_bluetooth.c
+++ b/audio/pcm_bluetooth.c
@@ -86,25 +86,27 @@ static snd_pcm_sframes_t bluetooth_pointer(snd_pcm_ioplug_t *io)
static void bluetooth_exit(struct bluetooth_data *data)
{
- int ret, len = sizeof(struct ipc_packet) + sizeof(struct ipc_data_status);
+ int ret, len = sizeof(struct ipc_packet) + sizeof(struct ipc_data_state);
struct ipc_packet *pkt;
- struct ipc_data_status *status;
+ struct ipc_data_state *state;
DBG("Sending PKT_TYPE_STATUS_REQ...");
- if ((pkt = malloc(len)) == 0)
+ if ((pkt = malloc(len)) == NULL)
goto done;
memset(pkt, 0, len);
- pkt->type = PKT_TYPE_STATUS_REQ;
+ pkt->type = PKT_TYPE_STATE_REQ;
pkt->role = PKT_ROLE_NONE;
pkt->error = PKT_ERROR_NONE;
- status = (struct ipc_data_status *) pkt->data;
- status->status = STATUS_DISCONNECTED;
+ state = (struct ipc_data_state *) pkt->data;
+ state->state = STATE_DISCONNECTED;
if ((ret = send(data->sock, pkt, len, 0)) < 0)
- DBG("OK");
+ DBG("Error %s (%d)", strerror(errno), errno);
+
+ free(pkt);
done:
if (data == NULL)
return;