CONNMAN_SERVICE_ERROR_INVALID_KEY);
}
+static void set_connect_error(struct connman_network *network)
+{
+ struct connman_service *service;
+
+ service = __connman_service_lookup_from_network(network);
+
+ __connman_service_indicate_error(service,
+ CONNMAN_SERVICE_ERROR_CONNECT_FAILED);
+}
+
void connman_network_set_ipv4_method(struct connman_network *network,
enum connman_ipconfig_method method)
{
struct connman_service *service;
struct connman_ipconfig *ipconfig;
- network->element.ipv4.method = method;
-
service = __connman_service_lookup_from_network(network);
if (service == NULL)
return;
struct connman_service *service;
struct connman_ipconfig *ipconfig;
- network->element.ipv6.method = method;
-
service = __connman_service_lookup_from_network(network);
if (service == NULL)
return;
case CONNMAN_NETWORK_ERROR_INVALID_KEY:
set_invalid_key_error(network);
break;
+ case CONNMAN_NETWORK_ERROR_CONNECT_FAIL:
+ set_connect_error(network);
+ break;
}
}
if ((network->connecting == TRUE || network->associating == TRUE) &&
connected == FALSE) {
- connman_element_set_error(&network->element,
- CONNMAN_ELEMENT_ERROR_CONNECT_FAILED);
+ connman_network_set_error(network,
+ CONNMAN_NETWORK_ERROR_CONNECT_FAIL);
__connman_network_disconnect(network);
}
if (element->state != CONNMAN_ELEMENT_STATE_ERROR)
return;
- if (element->error != CONNMAN_ELEMENT_ERROR_DHCP_FAILED)
- return;
-
if (network->connected == FALSE)
return;