Channel unreferencing here causing calling watchdog_cb and eventually connection is dismissed immediately. Channel is already freed in bnep.c:free_bnep_connect(). --- android/pan.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/android/pan.c b/android/pan.c index f74f1a7..a9557a0 100644 --- a/android/pan.c +++ b/android/pan.c @@ -156,8 +156,6 @@ static void bnep_conn_cb(GIOChannel *chan, char *iface, int err, void *data) dev->watch = g_io_add_watch(chan, G_IO_ERR | G_IO_HUP | G_IO_NVAL, bnep_watchdog_cb, dev); - g_io_channel_unref(dev->io); - dev->io = NULL; } static void connect_cb(GIOChannel *chan, GError *err, gpointer data) -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html