Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/2] android/hal-audio: Fix not closing audio_sk
@ 2014-01-20 12:25 Luiz Augusto von Dentz
  2014-01-20 12:25 ` [PATCH BlueZ 2/2] android/A2DP: Fix sending notification on bt_a2dp_unregister Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2014-01-20 12:25 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

shutdown will only disconnect the peers but it is still needed to close
the file descriptor.
---
 android/hal-audio.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/android/hal-audio.c b/android/hal-audio.c
index 2f6f8c2..0b4577e 100644
--- a/android/hal-audio.c
+++ b/android/hal-audio.c
@@ -246,6 +246,7 @@ static void audio_ipc_cleanup(void)
 {
 	if (audio_sk >= 0) {
 		shutdown(audio_sk, SHUT_RDWR);
+		close(audio_sk);
 		audio_sk = -1;
 	}
 }
@@ -1090,6 +1091,7 @@ static void *ipc_handler(void *data)
 
 		if (pfd.revents & (POLLHUP | POLLERR | POLLNVAL)) {
 			info("Audio HAL: Socket closed");
+			close(audio_sk);
 			audio_sk = -1;
 		}
 
-- 
1.8.4.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-21 11:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-20 12:25 [PATCH BlueZ 1/2] android/hal-audio: Fix not closing audio_sk Luiz Augusto von Dentz
2014-01-20 12:25 ` [PATCH BlueZ 2/2] android/A2DP: Fix sending notification on bt_a2dp_unregister Luiz Augusto von Dentz
2014-01-21 11:41   ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox