[gssdp] client: Fail init without host_mask



commit 6d744b1c6abe7130a328b3ef2e10026caf7b8ac2
Author: Jens Georg <mail jensge org>
Date:   Sun Nov 11 06:46:48 2018 +0100

    client: Fail init without host_mask
    
    After running get_host_ip, also check that we have a valid host_mask

 libgssdp/gssdp-client.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/libgssdp/gssdp-client.c b/libgssdp/gssdp-client.c
index 995f617..eb1c1da 100644
--- a/libgssdp/gssdp-client.c
+++ b/libgssdp/gssdp-client.c
@@ -1501,6 +1501,12 @@ init_network_info (GSSDPClient *client, GError **error)
                              priv->device.iface_name);
 
                 ret = FALSE;
+        } else if (priv->device.host_mask == NULL) {
+                g_set_error (error,
+                             GSSDP_ERROR,
+                             GSSDP_ERROR_FAILED,
+                             "No network mask?");
+                ret = FALSE;
         }
 
         g_debug ("Created SSDP client %p", client);


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