#include <config.h>
#endif
+#include <errno.h>
#include <string.h>
#include <net/if.h>
active_gateway = find_active_gateway();
new_gateway = add_gateway(service, index, gateway, type);
if (new_gateway == NULL)
- return 0;
+ return -EINVAL;
if (type == CONNMAN_IPCONFIG_TYPE_IPV6 &&
new_gateway->ipv6_gateway != NULL &&
if (err < 0)
goto err;
- __connman_service_ipconfig_indicate_state(service,
- CONNMAN_SERVICE_STATE_READY,
- CONNMAN_IPCONFIG_TYPE_IPV4);
-
return;
err:
if (err < 0)
goto err;
- __connman_service_ipconfig_indicate_state(service,
- CONNMAN_SERVICE_STATE_READY,
- CONNMAN_IPCONFIG_TYPE_IPV4);
-
return 0;
err:
connman_network_set_associating(network, FALSE);
- __connman_service_ipconfig_indicate_state(service,
- CONNMAN_SERVICE_STATE_READY,
- CONNMAN_IPCONFIG_TYPE_IPV4);
-
return;
err:
network->connecting = FALSE;
- __connman_service_ipconfig_indicate_state(service,
- CONNMAN_SERVICE_STATE_READY,
- CONNMAN_IPCONFIG_TYPE_IPV6);
-
return 0;
}
return err;
}
- __connman_ipconfig_gateway_add(ipconfig);
-
- __connman_service_ipconfig_indicate_state(service,
- CONNMAN_SERVICE_STATE_READY,
- CONNMAN_IPCONFIG_TYPE_IPV4);
-
- return 0;
+ return __connman_ipconfig_gateway_add(ipconfig);
}
int __connman_network_clear_ipconfig(struct connman_network *network,