diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2014-08-29 10:33:58 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-08-29 13:26:41 +0300 |
commit | e6eee7c2fcf974dbe56db7fae479bb224685dcb2 (patch) | |
tree | 830b9aa2c1062957651231ced2cb69cf3de6ba33 /android/avdtp.c | |
parent | 1b42893a9a7ee1b1334ea0eb911aa8a3584a259b (diff) | |
download | bluez-e6eee7c2fcf974dbe56db7fae479bb224685dcb2.tar.gz |
android/avdtp: Cleanup watch id when removing session watch
When session_cb returns FALSE respective watch id is removed so it
must be cleanup. This fix following Glib warning when unrefing
avdtp after transport was disconnected by remote:
(process:28510): GLib-CRITICAL **: Source ID 2 was not found when
attempting to remove it
Diffstat (limited to 'android/avdtp.c')
-rw-r--r-- | android/avdtp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/android/avdtp.c b/android/avdtp.c index c9bd8bccc..970476a89 100644 --- a/android/avdtp.c +++ b/android/avdtp.c @@ -1974,8 +1974,11 @@ static gboolean session_cb(GIOChannel *chan, GIOCondition cond, DBG(""); - if (cond & G_IO_NVAL) + if (cond & G_IO_NVAL) { + session->io_id = 0; + return FALSE; + } header = (void *) session->buf; @@ -2078,6 +2081,8 @@ next: failed: connection_lost(session, EIO); + session->io_id = 0; + return FALSE; } |