summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArron Wang <arron.wang@intel.com>2012-10-12 14:29:29 +0800
committerZhang zhengguang <zhengguang.zhang@intel.com>2013-07-01 11:04:43 +0800
commite151cda8b88a2e3f697180a8d00f02a31e4c3213 (patch)
tree503fe42110abbd436676ea057466c297165e7d2a /src
parenta5eded6f3a9cff14ab19ee696ce27cedd633cca3 (diff)
downloadconnman-e151cda8b88a2e3f697180a8d00f02a31e4c3213.tar.gz
connman-e151cda8b88a2e3f697180a8d00f02a31e4c3213.tar.bz2
connman-e151cda8b88a2e3f697180a8d00f02a31e4c3213.zip
Tizen: Add last known address in DHCP discovery request
Diffstat (limited to 'src')
-rw-r--r--src/dhcp.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/dhcp.c b/src/dhcp.c
index c5c14a8a..028035cf 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -412,6 +412,9 @@ static int dhcp_request(struct connman_dhcp *dhcp)
GDHCPClientError error;
const char *hostname;
int index;
+#if defined TIZEN_EXT
+ const char *last_address;
+#endif
DBG("dhcp %p", dhcp);
@@ -460,6 +463,14 @@ static int dhcp_request(struct connman_dhcp *dhcp)
service = connman_service_lookup_from_network(dhcp->network);
ipconfig = __connman_service_get_ip4config(service);
+#if defined TIZEN_EXT
+ last_address = __connman_ipconfig_get_dhcp_address(ipconfig);
+
+ if (last_address != NULL && strlen(last_address) > 0)
+ g_dhcp_client_set_address_known(dhcp_client, TRUE);
+
+ return g_dhcp_client_start(dhcp_client, last_address);
+#else
/*
* Clear the addresses at startup so that lease callback will
* take the lease and set ip address properly.
@@ -468,6 +479,7 @@ static int dhcp_request(struct connman_dhcp *dhcp)
return g_dhcp_client_start(dhcp_client,
__connman_ipconfig_get_dhcp_address(ipconfig));
+#endif
}
static int dhcp_release(struct connman_dhcp *dhcp)