Hi Luiz, On Wed, Oct 30, 2013, Luiz Augusto von Dentz wrote: > If the device is disconnected it should be removed from the list of > connected devices and free its data. > --- > android/hid.c | 13 ++----------- > 1 file changed, 2 insertions(+), 11 deletions(-) > > diff --git a/android/hid.c b/android/hid.c > index d6ca4b9..b198713 100644 > --- a/android/hid.c > +++ b/android/hid.c > @@ -149,15 +149,7 @@ static gboolean ctrl_watch_cb(GIOChannel *chan, GIOCondition cond, > if ((cond & (G_IO_HUP | G_IO_ERR)) && hdev->intr_watch) > g_io_channel_shutdown(chan, TRUE, NULL); > > - hdev->ctrl_watch = 0; > - > - if (hdev->ctrl_io) { > - g_io_channel_unref(hdev->ctrl_io); > - hdev->ctrl_io = NULL; > - } > - > - if (hdev->intr_io && !(cond & G_IO_NVAL)) > - g_io_channel_shutdown(hdev->intr_io, TRUE, NULL); > + hid_device_free(hdev); This change looses the shutdown call so it probably needs to stay in this function. Johan -- 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