Add wireguard related changes and test cases
[platform/core/api/vpn-setting.git] / dvpnlib / src / dvpnlib-vpn-connnection.c
index 3473a89..436ed47 100755 (executable)
@@ -805,7 +805,7 @@ GList *vpn_get_connections(void)
 struct vpn_connection *vpn_get_connection(
                const char *name, const char *host, const char *domain)
 {
-       if (!name || !host || !domain)
+       if (!name || !host)
                return NULL;
 
        GList *iter;
@@ -817,7 +817,7 @@ struct vpn_connection *vpn_get_connection(
 
                if (g_str_equal(connection->name, name) &&
                                g_str_equal(connection->host, host) &&
-                               g_str_equal(connection->domain, domain))
+                               (!domain || g_str_equal(connection->domain, domain)))
                        return connection;
        }