summaryrefslogtreecommitdiff
path: root/src/connection.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2011-07-08 11:33:18 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-07-08 11:33:18 +0200
commit98ecf19f9d69ef96e253d2c0f9cba12882bf37f6 (patch)
treeec8604d7d622a5154484662387528093006bc09d /src/connection.c
parent3ce93388b0f7a092f5855ac37db8fb30cf0c453e (diff)
downloadconnman-98ecf19f9d69ef96e253d2c0f9cba12882bf37f6.tar.gz
connman-98ecf19f9d69ef96e253d2c0f9cba12882bf37f6.tar.bz2
connman-98ecf19f9d69ef96e253d2c0f9cba12882bf37f6.zip
network: Let the gateway code handle the READY transition
For IPv4 (DHCP, fixed or manual), and for manual IPv6, the gateway handling code (connection.c) is the one responsible for moving to the READY state.
Diffstat (limited to 'src/connection.c')
-rw-r--r--src/connection.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/connection.c b/src/connection.c
index a6ac4627..4f3b3f89 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -24,6 +24,7 @@
#include <config.h>
#endif
+#include <errno.h>
#include <string.h>
#include <net/if.h>
@@ -455,7 +456,7 @@ int __connman_connection_gateway_add(struct connman_service *service,
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 &&