mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 06:26:15 +01:00
gdbus: Fix runtime warning with debug enabled
With debug enabled, g_dbus_connection_call_done() will throw a g_warning() if the call failed (on purpose or not) while trying to the serial of a non-existant reply. (/builds/GNOME/glib/_build/gio/tests/gdbus-connection:26921): GLib-GIO-CRITICAL **: 10:10:16.311: g_dbus_message_get_reply_serial: assertion 'G_IS_DBUS_MESSAGE (message)' failed
This commit is contained in:
parent
8fd71dccc5
commit
145dc5a49e
@ -5726,17 +5726,19 @@ g_dbus_connection_call_done (GObject *source,
|
|||||||
_g_dbus_debug_print_lock ();
|
_g_dbus_debug_print_lock ();
|
||||||
g_print ("========================================================================\n"
|
g_print ("========================================================================\n"
|
||||||
"GDBus-debug:Call:\n"
|
"GDBus-debug:Call:\n"
|
||||||
" <<<< ASYNC COMPLETE %s() (serial %d)\n"
|
" <<<< ASYNC COMPLETE %s()",
|
||||||
" ",
|
state->method_name);
|
||||||
state->method_name,
|
|
||||||
g_dbus_message_get_reply_serial (reply));
|
|
||||||
if (reply != NULL)
|
if (reply != NULL)
|
||||||
{
|
{
|
||||||
g_print ("SUCCESS\n");
|
g_print (" (serial %d)\n"
|
||||||
|
" SUCCESS\n",
|
||||||
|
g_dbus_message_get_reply_serial (reply));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_print ("FAILED: %s\n",
|
g_print ("\n"
|
||||||
|
" FAILED: %s\n",
|
||||||
error->message);
|
error->message);
|
||||||
}
|
}
|
||||||
_g_dbus_debug_print_unlock ();
|
_g_dbus_debug_print_unlock ();
|
||||||
|
Loading…
Reference in New Issue
Block a user