DBusMessageIter iter, array;
const char *mode = "managed", *security = "none", *group_security;
const char *type = NULL, *ssid = NULL, *passphrase = NULL;
+ connman_bool_t network_created = FALSE;
unsigned int ssid_len = 0;
const char *ident;
char *name, *group;
service = lookup_by_identifier(name);
- if (service != NULL)
- goto done;
+ if (service == NULL) {
+ network = create_hidden_wifi(device, ssid,
+ mode, security, group);
+ if (network != NULL)
+ connman_network_set_group(network, group);
- network = create_hidden_wifi(device, ssid, mode, security, group);
- if (network != NULL)
- connman_network_set_group(network, group);
+ service = lookup_by_identifier(name);
- service = lookup_by_identifier(name);
+ network_created = TRUE;
+ }
-done:
g_free(name);
g_free(group);
goto failed;
}
- service->network_created = TRUE;
+ service->network_created = network_created;
if (is_connected(service) == TRUE) {
err = -EISCONN;