]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
BusTransaction: remove confusing getter of connections
authorChengwei Yang <chengwei.yang@intel.com>
Thu, 28 Nov 2013 01:17:38 +0000 (09:17 +0800)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 6 Jan 2014 15:59:18 +0000 (15:59 +0000)
There is a DBusList* member of BusTransaction named "connections", while
its getter function bus_transaction_get_connections() returns
context->connections which in fact is a BusConnections pointer, this is
quite confusing. Because this is what bus_context_get_connections()
returns.

This patch call out to bus_context_get_connections() directly and remove
the then unused bus_transaction_get_connections().

https://bugs.freedesktop.org/show_bug.cgi?id=71597
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
bus/connection.c
bus/connection.h
bus/dispatch.c
bus/stats.c

index 8d741d6f5b6ea6bd0f7be64cf03789362e1546a7..ea2d155acfeacca9d2cf5157992d62ad7c96ab8e 100644 (file)
@@ -2026,12 +2026,6 @@ bus_transaction_get_context (BusTransaction  *transaction)
   return transaction->context;
 }
 
-BusConnections*
-bus_transaction_get_connections (BusTransaction  *transaction)
-{
-  return bus_context_get_connections (transaction->context);
-}
-
 dbus_bool_t
 bus_transaction_send_from_driver (BusTransaction *transaction,
                                   DBusConnection *connection,
index 13c8b99f6ecd8bd3c9308a568052e41305df3269..9f4f9aeaa782515a2b8671e7118c2e6e81d59b43 100644 (file)
@@ -122,7 +122,6 @@ typedef void (* BusTransactionCancelFunction) (void *data);
 
 BusTransaction* bus_transaction_new              (BusContext                   *context);
 BusContext*     bus_transaction_get_context      (BusTransaction               *transaction);
-BusConnections* bus_transaction_get_connections  (BusTransaction               *transaction);
 dbus_bool_t     bus_transaction_send             (BusTransaction               *transaction,
                                                   DBusConnection               *connection,
                                                   DBusMessage                  *message);
index 5fc0d112ed70a15d2ad174bb8ca604ca15d1dc51..7a61953fd8e184d94319c11398bc19e7fb8ccb6f 100644 (file)
@@ -133,7 +133,7 @@ bus_dispatch_matches (BusTransaction *transaction,
     }
 
   /* Now dispatch to others who look interested in this message */
-  connections = bus_transaction_get_connections (transaction);
+  connections = bus_context_get_connections (context);
   dbus_error_init (&tmp_error);
   matchmaker = bus_context_get_matchmaker (context);
 
index ec768ec79fc759c3f3c4ef1ac3d3111c98ce4a97..2bf86d6614bc1fdcf7b7e679422c9235f9d97d3f 100644 (file)
@@ -48,7 +48,7 @@ bus_stats_handle_get_stats (DBusConnection *connection,
 
   _DBUS_ASSERT_ERROR_IS_CLEAR (error);
 
-  connections = bus_transaction_get_connections (transaction);
+  connections = bus_context_get_connections (transaction->context);
 
   reply = _dbus_asv_new_method_return (message, &iter, &arr_iter);