summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2022-11-06 16:12:29 -0500
committerOlivier CrĂȘte <olivier.crete@collabora.com>2022-11-07 18:53:42 -0800
commitfa1546614190942ab266832e7470a6debf8c32cb (patch)
tree664447507f91c0b91a2b5bf2bf9f542ecf6dda69
parent14ebe219f7279d6101fe415a32c3f2a189ba5785 (diff)
downloadgupnp-igd-fa1546614190942ab266832e7470a6debf8c32cb.tar.gz
test: Port to g_inet_address_new_loopback
-rw-r--r--tests/gtest/gupnp-simple-igd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/gtest/gupnp-simple-igd.c b/tests/gtest/gupnp-simple-igd.c
index ec770ca..1f30b27 100644
--- a/tests/gtest/gupnp-simple-igd.c
+++ b/tests/gtest/gupnp-simple-igd.c
@@ -290,13 +290,16 @@ run_gupnp_simple_igd_test (GMainContext *mainctx, GUPnPSimpleIgd *igd,
GUPnPDeviceInfo *subdev2;
const gchar *xml_path = ".";
GError *error = NULL;
+ GInetAddress *loopback = NULL;
g_signal_connect (igd, "context-available",
G_CALLBACK (ignore_non_localhost), NULL);
if (mainctx)
g_main_context_push_thread_default (mainctx);
- context = gupnp_context_new ("lo", 0, NULL);
+ loopback = g_inet_address_new_loopback (G_SOCKET_FAMILY_IPV4);
+ context = gupnp_context_new_for_address (loopback, 0, GSSDP_UDA_VERSION_1_0, NULL);
+ g_object_unref (loopback);
g_assert (context);
if (g_getenv ("XML_PATH"))