static GSList *network_list = NULL;
static GSList *driver_list = NULL;
-static unsigned int hidden_counter = 0;
struct connman_network {
gint refcount;
connman_bool_t available;
connman_bool_t connected;
connman_bool_t roaming;
- connman_bool_t hidden;
connman_uint8_t strength;
connman_uint16_t frequency;
char *identifier;
network->refcount = 1;
- if (identifier == NULL) {
- ident = g_strdup_printf("hidden_%d", hidden_counter++);
- network->hidden = TRUE;
- } else
- ident = g_strdup(identifier);
+ ident = g_strdup(identifier);
if (ident == NULL) {
g_free(network);
*/
connman_bool_t connman_network_get_available(struct connman_network *network)
{
- if (network->hidden == TRUE)
- return TRUE;
-
return network->available;
}
struct connman_service *service;
__connman_device_set_network(network->device, NULL);
- network->hidden = FALSE;
service = __connman_service_lookup_from_network(network);
connman_network_set_associating(network, TRUE);
else {
network->connecting = FALSE;
- network->hidden = FALSE;
}
return err;
}
static struct connman_network *create_hidden_wifi(struct connman_device *device,
- const char *ssid, const char *mode, const char *security)
+ const char *ssid, const char *mode, const char *security,
+ const char *group)
{
struct connman_network *network;
char *name;
if (ssid_len < 1)
return NULL;
- network = connman_network_create(NULL, CONNMAN_NETWORK_TYPE_WIFI);
+ network = connman_network_create(group, CONNMAN_NETWORK_TYPE_WIFI);
if (network == NULL)
return NULL;
if (service != NULL)
goto done;
- network = create_hidden_wifi(device, ssid, mode, security);
+ network = create_hidden_wifi(device, ssid, mode, security, group);
if (network != NULL)
connman_network_set_group(network, group);