From: Denis Kenzior Date: Fri, 9 Apr 2010 18:30:56 +0000 (-0500) Subject: ppp: Use pppcp_signal functions directly X-Git-Tag: 0.21~394 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5270cc9bdc68b4da8cc8a6539b29c506b1c7a50;p=platform%2Fupstream%2Fofono.git ppp: Use pppcp_signal functions directly No real need to wrap them behind lcp_ functions --- diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c index 0215649..4f8d8f0 100644 --- a/gatchat/gatppp.c +++ b/gatchat/gatppp.c @@ -386,8 +386,8 @@ static void ppp_transition_phase(GAtPPP *ppp, enum ppp_phase phase) switch (phase) { case PPP_ESTABLISHMENT: - /* signal UP event to LCP */ - lcp_establish(ppp->lcp); + /* send an UP event to the lcp layer */ + pppcp_signal_up(ppp->lcp); break; case PPP_AUTHENTICATION: /* we don't do authentication right now, so send NONE */ @@ -396,7 +396,8 @@ static void ppp_transition_phase(GAtPPP *ppp, enum ppp_phase phase) /* otherwise we need to wait for the peer to send us a challenge */ break; case PPP_TERMINATION: - lcp_terminate(ppp->lcp); + /* send a CLOSE event to the lcp layer */ + pppcp_signal_close(ppp->lcp); break; case PPP_DEAD: ppp_dead(ppp); @@ -497,8 +498,8 @@ gboolean ppp_get_acfc(GAtPPP *ppp) /* Administrative Open */ void g_at_ppp_open(GAtPPP *ppp) { - /* send an OPEN event to the lcp layer */ - lcp_open(ppp->lcp); + /* send an open event to the lcp layer */ + pppcp_signal_open(ppp->lcp); } void g_at_ppp_set_credentials(GAtPPP *ppp, const char *username, diff --git a/gatchat/ppp.h b/gatchat/ppp.h index 0354050..ccbd80d 100644 --- a/gatchat/ppp.h +++ b/gatchat/ppp.h @@ -101,9 +101,6 @@ void ppp_set_acfc(GAtPPP *ppp, gboolean acfc); gboolean ppp_get_acfc(GAtPPP *ppp); struct pppcp_data * lcp_new(GAtPPP *ppp); void lcp_free(struct pppcp_data *lcp); -void lcp_open(struct pppcp_data *data); -void lcp_establish(struct pppcp_data *data); -void lcp_terminate(struct pppcp_data *data); void lcp_protocol_reject(struct pppcp_data *lcp, guint8 *packet, gsize len); void auth_process_packet(struct auth_data *data, guint8 *new_packet); void auth_set_credentials(struct auth_data *data, const char *username, diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c index a384a0d..304a72c 100644 --- a/gatchat/ppp_lcp.c +++ b/gatchat/ppp_lcp.c @@ -230,33 +230,6 @@ struct pppcp_proto lcp_proto = { .rcr = lcp_rcr, }; -void lcp_open(struct pppcp_data *data) -{ - if (data == NULL) - return; - - /* send an open event to the lcp layer */ - pppcp_signal_open(data); -} - -void lcp_establish(struct pppcp_data *data) -{ - if (data == NULL) - return; - - /* send an UP event to the lcp layer */ - pppcp_signal_up(data); -} - -void lcp_terminate(struct pppcp_data *data) -{ - if (data == NULL) - return; - - /* send a CLOSE event to the lcp layer */ - pppcp_signal_close(data); -} - void lcp_free(struct pppcp_data *pppcp) { struct ipcp_data *lcp = pppcp_get_data(pppcp);