mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 10:20:11 +01:00
libnm: fix "parameters" argument in nm_client_dbus_call() to be optional
It was documented to be an optional parameter. That is also in line
with g_dbus_connection_call(), which is essentially wrapped by nm_client_dbus_call().
Fixes: ce0e898fb4 ('libnm: refactor caching of D-Bus objects in NMClient')
This commit is contained in:
parent
cadb4fddd2
commit
ea85f6dfa3
1 changed files with 4 additions and 4 deletions
|
|
@ -531,7 +531,6 @@ _nm_client_dbus_call_simple(NMClient *self,
|
|||
nm_assert(object_path);
|
||||
nm_assert(interface_name);
|
||||
nm_assert(method_name);
|
||||
nm_assert(parameters);
|
||||
nm_assert(reply_type);
|
||||
|
||||
dbus_context = nm_g_main_context_push_thread_default_if_necessary(priv->dbus_context);
|
||||
|
|
@ -592,20 +591,21 @@ _nm_client_dbus_call(NMClient *self,
|
|||
nm_assert(object_path);
|
||||
nm_assert(interface_name);
|
||||
nm_assert(method_name);
|
||||
nm_assert(parameters);
|
||||
nm_assert(reply_type);
|
||||
|
||||
task = nm_g_task_new(source_obj, cancellable, source_tag, user_callback, user_callback_data);
|
||||
|
||||
if (!self) {
|
||||
nm_g_variant_unref_floating(parameters);
|
||||
if (parameters)
|
||||
nm_g_variant_unref_floating(parameters);
|
||||
g_task_return_error(task, _nm_client_new_error_nm_not_cached());
|
||||
return;
|
||||
}
|
||||
|
||||
priv = NM_CLIENT_GET_PRIVATE(self);
|
||||
if (!priv->name_owner) {
|
||||
nm_g_variant_unref_floating(parameters);
|
||||
if (parameters)
|
||||
nm_g_variant_unref_floating(parameters);
|
||||
g_task_return_error(task, _nm_client_new_error_nm_not_running());
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue