[next] telepathy-glib: _tp_dbus_starter_bus_conn: remove

Simon McVittie smcv at kemper.freedesktop.org
Wed May 2 04:26:09 PDT 2012


Module: telepathy-glib
Branch: next
Commit: 0b234d2d8c5049a3d87ec1cbabcb8f9b1833035a
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=0b234d2d8c5049a3d87ec1cbabcb8f9b1833035a

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Tue May  1 12:44:42 2012 +0100

_tp_dbus_starter_bus_conn: remove

There's no longer any need to cache a singleton starter bus connection,
because the only caller also caches a singleton.

Reviewed-by: Jonny Lamb <jonny.lamb at collabora.co.uk>

---

 telepathy-glib/dbus-daemon.c   |    2 +-
 telepathy-glib/dbus-internal.h |    3 ---
 telepathy-glib/dbus.c          |   13 -------------
 3 files changed, 1 insertions(+), 17 deletions(-)

diff --git a/telepathy-glib/dbus-daemon.c b/telepathy-glib/dbus-daemon.c
index ef09466..e9b566a 100644
--- a/telepathy-glib/dbus-daemon.c
+++ b/telepathy-glib/dbus-daemon.c
@@ -106,7 +106,7 @@ tp_dbus_daemon_dup (GError **error)
   if (starter_bus_daemon != NULL)
     return g_object_ref (starter_bus_daemon);
 
-  conn = _tp_dbus_starter_bus_conn (error);
+  conn = dbus_g_bus_get (DBUS_BUS_STARTER, error);
 
   if (conn == NULL)
     return NULL;
diff --git a/telepathy-glib/dbus-internal.h b/telepathy-glib/dbus-internal.h
index fda71b8..ec0378b 100644
--- a/telepathy-glib/dbus-internal.h
+++ b/telepathy-glib/dbus-internal.h
@@ -31,9 +31,6 @@ gboolean _tp_dbus_daemon_get_name_owner (TpDBusDaemon *self, gint timeout_ms,
 
 void _tp_register_dbus_glib_marshallers (void);
 
-DBusGConnection *_tp_dbus_starter_bus_conn (GError **error)
-  G_GNUC_WARN_UNUSED_RESULT;
-
 gboolean _tp_dbus_daemon_is_the_shared_one (TpDBusDaemon *self);
 
 GVariant *_tp_asv_to_vardict (const GHashTable *asv);
diff --git a/telepathy-glib/dbus.c b/telepathy-glib/dbus.c
index 2788439..54b4789 100644
--- a/telepathy-glib/dbus.c
+++ b/telepathy-glib/dbus.c
@@ -83,19 +83,6 @@
  */
 /* (#define + static inline in dbus.h) */
 
-DBusGConnection *
-_tp_dbus_starter_bus_conn (GError **error)
-{
-  static DBusGConnection *starter_bus = NULL;
-
-  if (starter_bus == NULL)
-    {
-      starter_bus = dbus_g_bus_get (DBUS_BUS_STARTER, error);
-    }
-
-  return starter_bus;
-}
-
 /**
  * TpDBusNameType:
  * @TP_DBUS_NAME_TYPE_UNIQUE: accept unique names like :1.123



More information about the telepathy-commits mailing list