From a5012ddc4e33cf97fe8beb6959239d7a69620bee Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Thu, 28 Nov 2013 09:17:38 +0800 Subject: [PATCH] BusTransaction: remove confusing getter of connections 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 --- bus/connection.c | 6 ------ bus/connection.h | 1 - bus/dispatch.c | 2 +- bus/stats.c | 2 +- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/bus/connection.c b/bus/connection.c index fddbc78..b8ae195 100644 --- a/bus/connection.c +++ b/bus/connection.c @@ -1990,12 +1990,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, diff --git a/bus/connection.h b/bus/connection.h index c936021..b1965c3 100644 --- a/bus/connection.h +++ b/bus/connection.h @@ -120,7 +120,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); diff --git a/bus/dispatch.c b/bus/dispatch.c index 5fc0d11..7a61953 100644 --- a/bus/dispatch.c +++ b/bus/dispatch.c @@ -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); diff --git a/bus/stats.c b/bus/stats.c index ec768ec..2bf86d6 100644 --- a/bus/stats.c +++ b/bus/stats.c @@ -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); -- 1.7.9.5