modem_pipe_attach() can send events before returning, which could provoke a crash as ppp->pipe, still NULL at that time, could be used either in receiving (if the pipe had some data pending) or in sending (if the PPP module had already been attached and had some data to send in its transmit buffer). ppp->pipe is now set before modem_pipe_attach(). Also, the ATTACHED_BIT is now set only after having actually attached. And finally, the send_work is now scheduled on PIPE_EVENT_OPENED so that data is flushed when the (closed) attached pipe is opened. Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no> |
||
|---|---|---|
| .. | ||
| backends | ||
| CMakeLists.txt | ||
| Kconfig | ||
| modem_chat.c | ||
| modem_cmux.c | ||
| modem_pipe.c | ||
| modem_ppp.c | ||