summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2021-04-30 15:05:05 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2021-05-03 22:22:01 +0200
commita0aa727af29c21c101d02f78b2db8bc818125da5 (patch)
tree1a48743cb988b85c25987f0b0ad028ae4790159f
parent9d0aca6757deb3259bb80b34fea20305aacf3550 (diff)
downloadNetworkManager-bg/dns-update-on-sigusr1.tar.gz
nmcli: remove nmc_dbus_call_sync()bg/dns-update-on-sigusr1
The function is unused now. All operations should be asynchronous so that nmcli keeps running the main loop.
-rw-r--r--src/nmcli/common.c44
-rw-r--r--src/nmcli/common.h8
2 files changed, 0 insertions, 52 deletions
diff --git a/src/nmcli/common.c b/src/nmcli/common.c
index 9309e36738..93901549c9 100644
--- a/src/nmcli/common.c
+++ b/src/nmcli/common.c
@@ -1446,50 +1446,6 @@ nmc_error_get_simple_message(GError *error)
return error->message;
}
-GVariant *
-nmc_dbus_call_sync(NmCli * nmc,
- const char * object_path,
- const char * interface_name,
- const char * method_name,
- GVariant * parameters,
- const GVariantType *reply_type,
- GError ** error)
-{
- gs_unref_object GDBusConnection *connection = NULL;
- gs_free_error GError *local = NULL;
- GVariant * result;
-
- if (nmc->timeout == -1)
- nmc->timeout = 90;
-
- connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &local);
- if (!connection) {
- g_set_error(error,
- NMCLI_ERROR,
- NMC_RESULT_ERROR_UNKNOWN,
- _("Error: error connecting to system bus: %s"),
- local->message);
- return NULL;
- }
-
- result = g_dbus_connection_call_sync(connection,
- "org.freedesktop.NetworkManager",
- object_path,
- interface_name,
- method_name,
- parameters,
- reply_type,
- G_DBUS_CALL_FLAGS_NONE,
- nmc->timeout * 1000,
- NULL,
- error);
-
- if (error && *error)
- g_dbus_error_strip_remote_error(*error);
-
- return result;
-}
-
/*****************************************************************************/
NM_UTILS_LOOKUP_STR_DEFINE(nm_connectivity_to_string,
diff --git a/src/nmcli/common.h b/src/nmcli/common.h
index f7e7181cc7..a479a45569 100644
--- a/src/nmcli/common.h
+++ b/src/nmcli/common.h
@@ -74,12 +74,4 @@ extern const NmcMetaGenericInfo *const metagen_dhcp_config[];
const char *nm_connectivity_to_string(NMConnectivityState connectivity);
-GVariant *nmc_dbus_call_sync(NmCli * nmc,
- const char * object_path,
- const char * interface_name,
- const char * method_name,
- GVariant * parameters,
- const GVariantType *reply_type,
- GError ** error);
-
#endif /* NMC_COMMON_H */