From b0b72400220b40056fc597b430eb10b2d71418c3 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sun, 22 Feb 2015 16:20:03 +0100 Subject: [PATCH] PPP, PPPoS, moved advise about modem from pppos_create() to ppp_open() pppos_create() can be called whether the modem is ready to process the PPP session since pppos_create() does not start the PPP session anymore, moved the advise from pppos_create() to ppp_open(). --- src/include/netif/ppp/ppp.h | 3 +++ src/netif/ppp/ppp.c | 3 +++ src/netif/ppp/pppos.c | 3 --- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/include/netif/ppp/ppp.h b/src/include/netif/ppp/ppp.h index eeb38201..a80dbb95 100644 --- a/src/include/netif/ppp/ppp.h +++ b/src/include/netif/ppp/ppp.h @@ -460,6 +460,9 @@ void ppp_set_notify_phase_callback(ppp_pcb *pcb, ppp_notify_phase_cb_fn notify_p * * Holdoff is the time to wait (in seconds) before initiating * the connection. + * + * If this port connects to a modem, the modem connection must be + * established before calling this. */ err_t ppp_open(ppp_pcb *pcb, u16_t holdoff); diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index a96fc7d1..0834f84d 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -255,6 +255,9 @@ void ppp_set_notify_phase_callback(ppp_pcb *pcb, ppp_notify_phase_cb_fn notify_p * * Holdoff is the time to wait (in seconds) before initiating * the connection. + * + * If this port connects to a modem, the modem connection must be + * established before calling this. */ err_t ppp_open(ppp_pcb *pcb, u16_t holdoff) { if (pcb->phase != PPP_PHASE_DEAD) { diff --git a/src/netif/ppp/pppos.c b/src/netif/ppp/pppos.c index 6221aa0a..b51c4a2f 100644 --- a/src/netif/ppp/pppos.c +++ b/src/netif/ppp/pppos.c @@ -167,9 +167,6 @@ ppp_get_fcs(u8_t byte) /* * Create a new PPP connection using the given serial I/O device. * - * If this port connects to a modem, the modem connection must be - * established before calling this. - * * Return 0 on success, an error code on failure. */ ppp_pcb *pppos_create(struct netif *pppif, sio_fd_t fd,