shared: allow nm_dbus_connection_call_finish_variant_cb() with D-Bus methods that have no return value
This commit is contained in:
@@ -205,10 +205,9 @@ _call_finish_cb (GObject *source,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!return_void) {
|
if (!return_void)
|
||||||
nm_assert (!g_variant_is_of_type (ret, G_VARIANT_TYPE ("()")));
|
|
||||||
g_task_return_pointer (task, g_steal_pointer (&ret), (GDestroyNotify) g_variant_unref);
|
g_task_return_pointer (task, g_steal_pointer (&ret), (GDestroyNotify) g_variant_unref);
|
||||||
} else {
|
else {
|
||||||
nm_assert (g_variant_is_of_type (ret, G_VARIANT_TYPE ("()")));
|
nm_assert (g_variant_is_of_type (ret, G_VARIANT_TYPE ("()")));
|
||||||
g_task_return_boolean (task, TRUE);
|
g_task_return_boolean (task, TRUE);
|
||||||
}
|
}
|
||||||
@@ -253,7 +252,6 @@ nm_dbus_connection_call_finish_void_strip_dbus_error_cb (GObject *source,
|
|||||||
*
|
*
|
||||||
* - user_data must be a GTask, whose reference will be consumed by the
|
* - user_data must be a GTask, whose reference will be consumed by the
|
||||||
* callback.
|
* callback.
|
||||||
* - the return GVariant must not be an empty tuple "()".
|
|
||||||
* - the GTask is returned either with error or with a pointer containing the GVariant.
|
* - the GTask is returned either with error or with a pointer containing the GVariant.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
|
Reference in New Issue
Block a user