diff options
author | Zhenhua Zhang <zhenhua.zhang@intel.com> | 2010-07-09 16:53:51 +0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-07-09 09:53:24 -0300 |
commit | a72e092d191274b8c395a39c3900090ae4e16533 (patch) | |
tree | 9b267201d962b705f024263c23efa5457d726efd /gatchat/ppp_cp.c | |
parent | 465a4f5ef53949439d0c711b92bc23ed763e21a6 (diff) | |
download | ofono-a72e092d191274b8c395a39c3900090ae4e16533.tar.bz2 |
ppp: Add MAX_IPCP_FAILURE to avoid timeout quickly
We use IPCP NAK response to stall the progress of acquiring the client
IP address from DHCP server. So we need to increase the max failure of
NAKs in IPCP handshaking.
Diffstat (limited to 'gatchat/ppp_cp.c')
-rw-r--r-- | gatchat/ppp_cp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gatchat/ppp_cp.c b/gatchat/ppp_cp.c index 647e241e..f6220d2c 100644 --- a/gatchat/ppp_cp.c +++ b/gatchat/ppp_cp.c @@ -997,7 +997,7 @@ void pppcp_set_local_options(struct pppcp_data *pppcp, } struct pppcp_data *pppcp_new(GAtPPP *ppp, const struct pppcp_proto *proto, - gboolean dormant) + gboolean dormant, guint max_failure) { struct pppcp_data *data; @@ -1016,7 +1016,11 @@ struct pppcp_data *pppcp_new(GAtPPP *ppp, const struct pppcp_proto *proto, data->terminate_timer_data.max_counter = MAX_TERMINATE; data->config_timer_data.data = data; data->terminate_timer_data.data = data; - data->max_failure = MAX_FAILURE; + + if (max_failure) + data->max_failure = max_failure; + else + data->max_failure = MAX_FAILURE; data->ppp = ppp; data->driver = proto; |