* ppp_enter_phase calls ppp_dead if the PPP phase is PPP_PHASE_DEAD
&& ppp->sta_pending == FALSE, but fails if sta_pending is never set
to FALSE. So a timeout handler was added to handle this case too.
---
gatchat/gatppp.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c
index 5144084..f84535a 100644
--- a/gatchat/gatppp.c
+++ b/gatchat/gatppp.c
@@ -361,8 +361,12 @@ static inline void ppp_enter_phase(GAtPPP *ppp, enum ppp_phase
phase)
DBG(ppp, "%d", phase);
ppp->phase = phase;
- if (phase == PPP_PHASE_DEAD && ppp->sta_pending == FALSE)
- ppp->ppp_dead_source = g_idle_add(ppp_dead, ppp);
+ if (phase == PPP_PHASE_DEAD) {
+ if(ppp->sta_pending)
+ ppp->ppp_dead_source = g_timeout_add(5000, ppp_dead, ppp);
+ else
+ ppp->ppp_dead_source = g_idle_add(ppp_dead, ppp);
+ }
}
void ppp_set_auth(GAtPPP *ppp, const guint8* auth_data)
--
2.1.0