summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2017-06-21 16:25:01 +0100
committerSimon McVittie <smcv@collabora.com>2017-06-29 15:43:25 +0100
commit93e1cf572c99f3c9ec029b95e12bffb443a9e0e4 (patch)
treef24a65aa09a0dd3ebf44ad06595265a2d45bedd4
parent032bb7206b1d7a8191a5c7df72f783f21bba9339 (diff)
downloaddbus-93e1cf572c99f3c9ec029b95e12bffb443a9e0e4.tar.gz
bus_driver_send_ack_reply: Make available to other modules
Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101567
-rw-r--r--bus/driver.c23
-rw-r--r--bus/driver.h4
2 files changed, 14 insertions, 13 deletions
diff --git a/bus/driver.c b/bus/driver.c
index 964a943c..cd0a714d 100644
--- a/bus/driver.c
+++ b/bus/driver.c
@@ -966,11 +966,11 @@ bus_driver_handle_activate_service (DBusConnection *connection,
return retval;
}
-static dbus_bool_t
-send_ack_reply (DBusConnection *connection,
- BusTransaction *transaction,
- DBusMessage *message,
- DBusError *error)
+dbus_bool_t
+bus_driver_send_ack_reply (DBusConnection *connection,
+ BusTransaction *transaction,
+ DBusMessage *message,
+ DBusError *error)
{
DBusMessage *reply;
@@ -1266,8 +1266,7 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection,
}
}
- if (!send_ack_reply (connection, transaction,
- message, error))
+ if (!bus_driver_send_ack_reply (connection, transaction, message, error))
goto out;
retval = TRUE;
@@ -1354,8 +1353,7 @@ bus_driver_handle_add_match (DBusConnection *connection,
goto failed;
}
- if (!send_ack_reply (connection, transaction,
- message, error))
+ if (!bus_driver_send_ack_reply (connection, transaction, message, error))
{
bus_matchmaker_remove_rule (matchmaker, rule);
goto failed;
@@ -1405,8 +1403,7 @@ bus_driver_handle_remove_match (DBusConnection *connection,
/* Send the ack before we remove the rule, since the ack is undone
* on transaction cancel, but rule removal isn't.
*/
- if (!send_ack_reply (connection, transaction,
- message, error))
+ if (!bus_driver_send_ack_reply (connection, transaction, message, error))
goto failed;
matchmaker = bus_connection_get_matchmaker (connection);
@@ -2249,7 +2246,7 @@ bus_driver_handle_become_monitor (DBusConnection *connection,
/* Send the ack before we remove the rule, since the ack is undone
* on transaction cancel, but becoming a monitor isn't.
*/
- if (!send_ack_reply (connection, transaction, message, error))
+ if (!bus_driver_send_ack_reply (connection, transaction, message, error))
goto out;
if (!bus_connection_be_monitor (connection, transaction, &rules, error))
@@ -2337,7 +2334,7 @@ bus_driver_handle_ping (DBusConnection *connection,
DBusMessage *message,
DBusError *error)
{
- return send_ack_reply (connection, transaction, message, error);
+ return bus_driver_send_ack_reply (connection, transaction, message, error);
}
static dbus_bool_t bus_driver_handle_get (DBusConnection *connection,
diff --git a/bus/driver.h b/bus/driver.h
index 36a1db91..ac1289da 100644
--- a/bus/driver.h
+++ b/bus/driver.h
@@ -62,5 +62,9 @@ BusDriverFound bus_driver_get_conn_helper (DBusConnection *connection,
const char **name_p,
DBusConnection **peer_conn_p,
DBusError *error);
+dbus_bool_t bus_driver_send_ack_reply (DBusConnection *connection,
+ BusTransaction *transaction,
+ DBusMessage *message,
+ DBusError *error);
#endif /* BUS_DRIVER_H */