From 66ea6e01c8887cba20583270e51447d43cc7eeea Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 3 Dec 2019 16:32:08 +0100 Subject: [PATCH] libnm: drop unused _nm_dbus_proxy_call_sync() helper It's unused and: - we probably should avoid GDBusProxy altogether - we very likely should avoid blocking D-Bus calls --- libnm-core/nm-core-internal.h | 9 ------- libnm-core/nm-dbus-utils.c | 46 ----------------------------------- 2 files changed, 55 deletions(-) diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h index b7222df20a..1e5ee63790 100644 --- a/libnm-core/nm-core-internal.h +++ b/libnm-core/nm-core-internal.h @@ -389,15 +389,6 @@ GVariant *_nm_dbus_proxy_call_finish (GDBusProxy *proxy, const GVariantType *reply_type, GError **error); -GVariant *_nm_dbus_proxy_call_sync (GDBusProxy *proxy, - const char *method_name, - GVariant *parameters, - const GVariantType *reply_type, - GDBusCallFlags flags, - int timeout_msec, - GCancellable *cancellable, - GError **error); - GVariant * _nm_dbus_connection_call_finish (GDBusConnection *dbus_connection, GAsyncResult *result, const GVariantType *reply_type, diff --git a/libnm-core/nm-dbus-utils.c b/libnm-core/nm-dbus-utils.c index 8309294800..72b9fe1f44 100644 --- a/libnm-core/nm-dbus-utils.c +++ b/libnm-core/nm-dbus-utils.c @@ -221,52 +221,6 @@ _nm_dbus_proxy_call_finish (GDBusProxy *proxy, return variant; } -/** - * _nm_dbus_proxy_call_sync: - * @proxy: A #GDBusProxy. - * @method_name: Name of method to invoke. - * @parameters: (allow-none): A #GVariant tuple with parameters for the signal - * or %NULL if not passing parameters. - * @reply_type: (allow-none): the expected type of the reply, or %NULL - * @flags: Flags from the #GDBusCallFlags enumeration. - * @timeout_msec: The timeout in milliseconds (with %G_MAXINT meaning - * "infinite") or -1 to use the proxy default timeout. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the @method_name method on @proxy, as with - * g_dbus_proxy_call_sync(), except that if @reply_type is non-%NULL, then the - * reply to the call will be checked against it, and an error returned if it - * does not match. - * - * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with - * return values. Free with g_variant_unref(). - */ -GVariant * -_nm_dbus_proxy_call_sync (GDBusProxy *proxy, - const char *method_name, - GVariant *parameters, - const GVariantType *reply_type, - GDBusCallFlags flags, - int timeout_msec, - GCancellable *cancellable, - GError **error) -{ - GVariant *variant; - - variant = g_dbus_proxy_call_sync (proxy, - method_name, - parameters, - flags, - timeout_msec, - cancellable, - error); - if ( variant - && !_nm_dbus_typecheck_response (variant, reply_type, error)) - nm_clear_pointer (&variant, g_variant_unref); - return variant; -} - GVariant * _nm_dbus_connection_call_finish (GDBusConnection *dbus_connection, GAsyncResult *result,