From 43a026b8883399a8a72bdf902a4befb83edf2dc6 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 24 Feb 2009 17:31:40 +0200 Subject: Track and cancel requests in client_free --- audio/unix.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/audio/unix.c b/audio/unix.c index a39f1806..3d0b6d7b 100644 --- a/audio/unix.c +++ b/audio/unix.c @@ -94,6 +94,9 @@ static void client_free(struct unix_client *client) { struct a2dp_data *a2dp; + if (client->req_id) + client->cancel(client->dev, client->req_id); + switch (client->type) { case TYPE_SINK: case TYPE_SOURCE: @@ -797,6 +800,9 @@ static void start_resume(struct audio_device *dev, struct unix_client *client) goto failed; } + client->req_id = id; + client->dev = dev; + return; failed: -- cgit