diff options
-rw-r--r-- | gatchat/gatppp.c | 8 | ||||
-rw-r--r-- | gatchat/ppp.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c index eb440300..d9ab89ce 100644 --- a/gatchat/gatppp.c +++ b/gatchat/gatppp.c @@ -407,6 +407,14 @@ void ppp_set_auth(GAtPPP *ppp, const guint8* auth_data) } } +void ppp_auth_notify(GAtPPP *ppp, gboolean success) +{ + if (success) + ppp_enter_phase(ppp, PPP_PHASE_NETWORK); + else + ppp_enter_phase(ppp, PPP_PHASE_TERMINATION); +} + void ppp_set_recv_accm(GAtPPP *ppp, guint32 accm) { ppp->recv_accm = accm; diff --git a/gatchat/ppp.h b/gatchat/ppp.h index e975c21b..565a9fa0 100644 --- a/gatchat/ppp.h +++ b/gatchat/ppp.h @@ -91,6 +91,7 @@ void ppp_debug(GAtPPP *ppp, const char *str); void ppp_enter_phase(GAtPPP *ppp, enum ppp_phase phase); void ppp_transmit(GAtPPP *ppp, guint8 *packet, guint infolen); void ppp_set_auth(GAtPPP *ppp, const guint8 *auth_data); +void ppp_auth_notify(GAtPPP *ppp, gboolean success); void ppp_set_recv_accm(GAtPPP *ppp, guint32 accm); void ppp_set_xmit_accm(GAtPPP *ppp, guint32 accm); void ppp_set_pfc(GAtPPP *ppp, gboolean pfc); |