diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2020-10-20 19:51:22 -0400 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2020-10-20 19:51:22 -0400 |
commit | e70dcd0a9f89efbdaa011c20737ad550635ea580 (patch) | |
tree | a71a2fa247107cdb56194eeec4be9f54bee34f49 /tests/check/transmitter/rawudp-upnp.c | |
parent | 46d7b108179b477a00464fc47dc8aa1c6389ee03 (diff) | |
download | farstream-e70dcd0a9f89efbdaa011c20737ad550635ea580.tar.gz |
Update the configure test to match
Diffstat (limited to 'tests/check/transmitter/rawudp-upnp.c')
-rw-r--r-- | tests/check/transmitter/rawudp-upnp.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/check/transmitter/rawudp-upnp.c b/tests/check/transmitter/rawudp-upnp.c index 4818cd28..9ccf85d8 100644 --- a/tests/check/transmitter/rawudp-upnp.c +++ b/tests/check/transmitter/rawudp-upnp.c @@ -37,7 +37,7 @@ get_vars (gboolean *out_got_address, } -#ifdef HAVE_GUPNP +#if defined(HAVE_GUPNP_CORE_10) || defined(HAVE_GUPNP_CORE_12) #include <libgupnp/gupnp.h> @@ -126,8 +126,14 @@ start_upnp_server (void) GUPnPDeviceInfo *subdev1; GUPnPDeviceInfo *subdev2; const gchar *upnp_xml_path; + GError *gerr = NULL; - context = gupnp_context_new (NULL, NULL, 0, NULL); +#ifdef HAVE_GUPNP_CORE_12 + context = gupnp_context_new (NULL, 0, &gerr); +#else + context = gupnp_context_new (NULL, NULL, 0, &gerr); +#endif + g_assert_no_error (gerr); ts_fail_if (context == NULL, "Can't get gupnp context"); if (g_getenv ("UPNP_XML_PATH")) @@ -137,8 +143,14 @@ start_upnp_server (void) gupnp_context_host_path (context, upnp_xml_path, ""); +#ifdef HAVE_GUPNP_CORE_12 + dev = gupnp_root_device_new (context, "InternetGatewayDevice.xml", + upnp_xml_path, &gerr); + g_assert_no_error (gerr); +#else dev = gupnp_root_device_new (context, "InternetGatewayDevice.xml", upnp_xml_path); +#endif ts_fail_if (dev == NULL, "could not get root dev"); subdev1 = gupnp_device_info_get_device (GUPNP_DEVICE_INFO (dev), |