summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gdbus/gdbus.h14
-rw-r--r--gdbus/object.c17
2 files changed, 5 insertions, 26 deletions
diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h
index f7187f22..8bce2ee5 100644
--- a/gdbus/gdbus.h
+++ b/gdbus/gdbus.h
@@ -43,9 +43,6 @@ gboolean g_dbus_set_disconnect_function(DBusConnection *connection,
#define DBUS_TYPE_STRING_ARRAY_AS_STRING (DBUS_TYPE_ARRAY_AS_STRING DBUS_TYPE_STRING_AS_STRING)
#define DBUS_TYPE_BYTE_ARRAY_AS_STRING (DBUS_TYPE_ARRAY_AS_STRING DBUS_TYPE_BYTE_AS_STRING)
-DBusHandlerResult dbus_connection_send_and_unref(DBusConnection *connection,
- DBusMessage *message);
-
dbus_bool_t dbus_connection_create_object_path(DBusConnection *connection,
const char *path, void *user_data,
DBusObjectPathUnregisterFunction function);
@@ -111,17 +108,6 @@ dbus_bool_t dbus_connection_emit_property_changed(DBusConnection *conn,
const char *name,
int type, void *value);
-static inline DBusHandlerResult send_message_and_unref(DBusConnection *conn,
- DBusMessage *msg)
-{
- if (msg) {
- dbus_connection_send(conn, msg, NULL);
- dbus_message_unref(msg);
- }
-
- return DBUS_HANDLER_RESULT_HANDLED;
-}
-
typedef void (* GDBusDestroyFunction) (void *user_data);
typedef DBusMessage * (* GDBusMethodFunction) (DBusConnection *connection,
diff --git a/gdbus/object.c b/gdbus/object.c
index 0e979f97..5d956f29 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -58,17 +58,6 @@ struct interface_data {
DBusPropertyVTable *old_properties;
};
-DBusHandlerResult dbus_connection_send_and_unref(DBusConnection *connection,
- DBusMessage *message)
-{
- if (message) {
- dbus_connection_send(connection, message, NULL);
- dbus_message_unref(message);
- }
-
- return DBUS_HANDLER_RESULT_HANDLED;
-}
-
static void print_arguments(GString *gstr, const char *sig, const char *direction)
{
int i;
@@ -261,7 +250,11 @@ static DBusHandlerResult introspect(DBusConnection *connection,
dbus_message_append_args(reply, DBUS_TYPE_STRING, &data->introspect,
DBUS_TYPE_INVALID);
- return dbus_connection_send_and_unref(connection, reply);
+ dbus_connection_send(connection, reply, NULL);
+
+ dbus_message_unref(reply);
+
+ return DBUS_HANDLER_RESULT_HANDLED;
}
static void generic_unregister(DBusConnection *connection, void *user_data)