diff options
author | Thomas Haller <thaller@redhat.com> | 2018-03-01 17:38:41 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-03-12 18:02:20 +0100 |
commit | 062f86d88e407871602eb610439b1bdd92547196 (patch) | |
tree | 43ca2cb56b6515f5bf96a48e2260072ab8a52c62 /libnm-core/nm-dbus-utils.c | |
parent | 39db757e44bb5c59969f143b228e40ea27a232a9 (diff) | |
download | NetworkManager-062f86d88e407871602eb610439b1bdd92547196.tar.gz |
secret-agent: don't use generated NMDBusSecretAgent proxy
The generated code is really just a thin wrapper around direct
GDBusProxy calls. GDBusProxy is reasonably convenient to use directly,
drop this wrapper.
We also don't use a generated wrapper for other cases where
NetworkManager acts as a D-Bus client. There is no reason to
do it in this case.
While the nmdbus_*() functions that we were using are small wrappers,
we also created a NMDBusSecretAgent instance, and hence several other
functions and symbols are used as well. It's unnecessary.
This saves 8552 bytes for NetworkManager binary (2817944 vs. 2809392
bytes for contrib/rpm on x86_64).
Diffstat (limited to 'libnm-core/nm-dbus-utils.c')
-rw-r--r-- | libnm-core/nm-dbus-utils.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libnm-core/nm-dbus-utils.c b/libnm-core/nm-dbus-utils.c index 79020b2d49..ea7bf783c4 100644 --- a/libnm-core/nm-dbus-utils.c +++ b/libnm-core/nm-dbus-utils.c @@ -176,11 +176,13 @@ _nm_dbus_signal_connect_data (GDBusProxy *proxy, static void -typecheck_response (GVariant **response, - const GVariantType *reply_type, - GError **error) +typecheck_response (GVariant **response, + const GVariantType *reply_type, + GError **error) { - if (*response && reply_type && !g_variant_is_of_type (*response, reply_type)) { + if ( *response + && reply_type + && !g_variant_is_of_type (*response, reply_type)) { /* This is the same error code that g_dbus_connection_call() returns if * @reply_type doesn't match. */ |