Skip to contentSkip to conversation

attrib/interactive: fix duplicate close

PATCH New SeulKi Shin 1 participant 1 message Aug 11, 2016 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 attrib/interactive: fix duplicate close

This patch removes following warning message when gatttool exits interactive mode.
(gatttool:457): GLib-WARNING **: Invalid file descriptor.

Since g_attrib_unref closes GIOChannel's fd g_io_channel_shutdown should not be called here. This is because GAttrib is always created with "close on unref" flag.

---
 attrib/interactive.c | 1 -
 1 file changed, 1 deletion(-)
attrib/interactive.c +0 -1
index 7d4786a..4c48ca9 100644
@@ -192,7 +192,6 @@ static void disconnect_io()
 	attrib = NULL;
 	opt_mtu = 0;
 
-	g_io_channel_shutdown(iochannel, FALSE, NULL);
 	g_io_channel_unref(iochannel);
 	iochannel = NULL;
 
Signature · 1 line
2.9.2.windows.1