mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-27 19:50:44 +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') (cherry picked from commitea85f6dfa3) (cherry picked from commitce629741f1)
This commit is contained in:
parent
864e1748aa
commit
da166edc3f
1 changed files with 4 additions and 4 deletions
|
|
@ -529,7 +529,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);
|
||||
|
|
@ -590,20 +589,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