[glib/wip/hadess/test-fixes: 16/16] tests: Fix error path not setting an error
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/hadess/test-fixes: 16/16] tests: Fix error path not setting an error
- Date: Tue, 7 Jan 2020 15:07:50 +0000 (UTC)
commit e537716540ead22d30216a9367180482896acd18
Author: Bastien Nocera <hadess hadess net>
Date: Mon Dec 2 17:38:25 2019 +0100
tests: Fix error path not setting an error
This failure path should have set the GError but did not.
gio/tests/socket.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gio/tests/socket.c b/gio/tests/socket.c
index aea71dd45..e095d0195 100644
--- a/gio/tests/socket.c
+++ b/gio/tests/socket.c
@@ -140,7 +140,11 @@ create_server_full (GSocketFamily family,
{
g_socket_set_option (data->server, IPPROTO_IPV6, IPV6_V6ONLY, FALSE, NULL);
if (!g_socket_speaks_ipv4 (data->server))
- goto error;
+ {
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+ "IPv6-only server cannot speak IPv4");
+ goto error;
+ }
}
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]