Diff between b9dbc3762b5ec0a7b62497866cd0d5bab4433ee0 and 25afc21cba0a451097c4def7416fd22ddee7b607
Changed Files
| File | Additions | Deletions | Status |
| attrib/gattrib.c | +3 | -1 | modified |
Full Patch
diff --git a/attrib/gattrib.c b/attrib/gattrib.c
index 82a6133..c36a207 100644
--- a/attrib/gattrib.c
+++ b/attrib/gattrib.c
@@ -108,7 +108,6 @@ GAttrib *g_attrib_new(GIOChannel *io, guint16 mtu)
if (!attr)
return NULL;
- g_io_channel_set_close_on_unref(io, FALSE);
g_io_channel_ref(io);
attr->io = io;
@@ -116,6 +115,9 @@ GAttrib *g_attrib_new(GIOChannel *io, guint16 mtu)
if (!attr->att)
goto fail;
+ bt_att_set_close_on_unref(attr->att, true);
+ g_io_channel_set_close_on_unref(io, FALSE);
+
if (!bt_att_set_mtu(attr->att, mtu))
goto fail;