Linux bluetooth development
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 3/4] gdbus: Fix not calling dbus_connection_close for private connections
Date: Mon, 19 Nov 2012 10:46:25 +0200	[thread overview]
Message-ID: <1353314786-11427-3-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1353314786-11427-1-git-send-email-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

dbus_bus_get_private documentation says:

  "Unlike dbus_bus_get(), always creates a new connection. This
  connection will not be saved or recycled by libdbus. Caller owns a
  reference to the bus and must either close it or know it to be closed
  prior to releasing this reference."
---
 gdbus/mainloop.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdbus/mainloop.c b/gdbus/mainloop.c
index 49e6538..4771f20 100644
--- a/gdbus/mainloop.c
+++ b/gdbus/mainloop.c
@@ -328,6 +328,7 @@ DBusConnection *g_dbus_setup_private(DBusBusType type, const char *name,
 	if (g_dbus_connect(conn, name, error))
 		return conn;
 
+	dbus_connection_close(conn);
 	dbus_connection_unref(conn);
 	return NULL;
 }
-- 
1.7.11.7


  parent reply	other threads:[~2012-11-19  8:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-19  8:46 [PATCH BlueZ 1/4] gdbus: Fix having multiple path exporting ObjectManager Luiz Augusto von Dentz
2012-11-19  8:46 ` [PATCH BlueZ 2/4] gdbus: Automatically register '/' path Luiz Augusto von Dentz
2012-11-19 12:06   ` Lucas De Marchi
2012-11-19 12:49     ` Luiz Augusto von Dentz
2012-11-19 13:18       ` Lucas De Marchi
2012-11-19 15:08         ` Luiz Augusto von Dentz
2012-11-19 15:38           ` Lucas De Marchi
2012-11-19  8:46 ` Luiz Augusto von Dentz [this message]
2012-11-19  8:46 ` [PATCH BlueZ 4/4] core: Make use of g_dbus_close Luiz Augusto von Dentz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1353314786-11427-3-git-send-email-luiz.dentz@gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox