CONNMAN_SERVICE_STATE_CONFIGURATION);
}
+static int set_connected_fixed(struct connman_network *network)
+{
+ struct connman_service *service;
+ struct connman_element *parent, *element;
+
+ DBG("");
+
+ service = __connman_service_lookup_from_network(network);
+
+ parent = connman_network_get_element(network);
+
+ set_configuration(network);
+
+ if (parent->ipv4.address == NULL)
+ return -EINVAL;
+
+ if (parent->ipv4.netmask == NULL)
+ return -EINVAL;
+
+ element = connman_element_create(NULL);
+ if (element == NULL) {
+ connman_error("Can not create connman_element");
+ return -ENOMEM;
+ }
+
+ element->type = CONNMAN_ELEMENT_TYPE_IPV4;
+ element->index = parent->index;
+
+ if (connman_element_register(element, parent) < 0) {
+ connman_error("Can not register connman_element");
+ return -EINVAL;
+ }
+
+ network->connecting = FALSE;
+
+ connman_network_set_associating(network, FALSE);
+
+ return 0;
+}
+
static void set_connected_manual(struct connman_network *network)
{
struct connman_service *service;
case CONNMAN_IPCONFIG_METHOD_UNKNOWN:
case CONNMAN_IPCONFIG_METHOD_OFF:
return FALSE;
- case CONNMAN_IPCONFIG_METHOD_MANUAL:
case CONNMAN_IPCONFIG_METHOD_FIXED:
+ if (set_connected_fixed(network) < 0) {
+ connman_network_set_error(network,
+ CONNMAN_NETWORK_ERROR_ASSOCIATE_FAIL);
+ return FALSE;
+ }
+ return TRUE;
+ case CONNMAN_IPCONFIG_METHOD_MANUAL:
set_connected_manual(network);
return TRUE;
case CONNMAN_IPCONFIG_METHOD_DHCP: