[gupnp: 23/25] tests: No need to check for error on gupnp0 detect




commit d39232a1d9c089c251339ba20fdc97639b0808a0
Author: Jens Georg <mail jensge org>
Date:   Wed Dec 29 16:58:44 2021 +0100

    tests: No need to check for error on gupnp0 detect

 tests/test-acl.c     | 4 ++--
 tests/test-context.c | 8 ++++++--
 2 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/tests/test-acl.c b/tests/test-acl.c
index 321171a..25e2b42 100644
--- a/tests/test-acl.c
+++ b/tests/test-acl.c
@@ -407,7 +407,7 @@ main (int argc, char *argv[])
         // Detect if there is a special network device with "proper" ip addresses to check also link-local 
addresses
         GUPnPContext *c = g_initable_new (GUPNP_TYPE_CONTEXT,
                                           NULL,
-                                          &error,
+                                          NULL,
                                           "interface",
                                           "gupnp0",
                                           "address-family",
@@ -423,7 +423,7 @@ main (int argc, char *argv[])
 
         c = g_initable_new (GUPNP_TYPE_CONTEXT,
                             NULL,
-                            &error,
+                            NULL,
                             "interface",
                             "gupnp0",
                             "address-family",
diff --git a/tests/test-context.c b/tests/test-context.c
index 8fefdc7..e72ec70 100644
--- a/tests/test-context.c
+++ b/tests/test-context.c
@@ -1106,7 +1106,7 @@ main (int argc, char *argv[])
         // Detect if there is a special network device with "proper" ip addresses to check also link-local 
addresses
         GUPnPContext *c = g_initable_new (GUPNP_TYPE_CONTEXT,
                                           NULL,
-                                          &error,
+                                          NULL,
                                           "interface",
                                           "gupnp0",
                                           "address-family",
@@ -1114,6 +1114,8 @@ main (int argc, char *argv[])
                                           NULL);
 
         if (c != NULL) {
+                g_debug ("Adding address %s from device gupnp0",
+                         gssdp_client_get_host_ip (GSSDP_CLIENT (c)));
                 g_ptr_array_add (
                         addresses,
                         g_strdup (gssdp_client_get_host_ip (GSSDP_CLIENT (c))));
@@ -1122,7 +1124,7 @@ main (int argc, char *argv[])
 
         c = g_initable_new (GUPNP_TYPE_CONTEXT,
                             NULL,
-                            &error,
+                            NULL,
                             "interface",
                             "gupnp0",
                             "address-family",
@@ -1130,6 +1132,8 @@ main (int argc, char *argv[])
                             NULL);
 
         if (c != NULL) {
+                g_debug ("Adding address %s from device gupnp0",
+                         gssdp_client_get_host_ip (GSSDP_CLIENT (c)));
                 g_ptr_array_add (
                         addresses,
                         g_strdup (gssdp_client_get_host_ip (GSSDP_CLIENT (c))));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]