Skip to content

Commit 31db8aa

Browse files
committed
Allow ppp to send data in PPPOS_START_PPP
This speeds up session setup by avoiding retry due to send error on the first packet.
1 parent bb74255 commit 31db8aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mgos_pppos.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static void mgos_pppos_set_net_status(struct mgos_pppos_data *pd,
151151
static u32_t mgos_pppos_send_cb(ppp_pcb *pcb, u8_t *data, u32_t len,
152152
void *ctx) {
153153
struct mgos_pppos_data *pd = (struct mgos_pppos_data *) ctx;
154-
if (pd->state != PPPOS_RUN) {
154+
if (pd->state != PPPOS_RUN && pd->state != PPPOS_START_PPP) {
155155
/* Doing something else - e.g. running user command. */
156156
return 0;
157157
}

0 commit comments

Comments
 (0)