Trying to start a chat script using either modem_chat_run_script() or modem_chat_run_script_async() should result in returning -EBUSY without affecting the currently running script and thread waiting on the current script to stop. The current behavior causes the thread waiting for the current script to stop to return with error -EAGAIN, and the thread trying to start the new script to return with error -EBUSY. This commit moves the reset of the sem the current thread is waiting on, to after the check of whether a script is currently running, leaving the current thread unaffected as is intended. Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me> |
||
|---|---|---|
| .. | ||
| backends | ||
| CMakeLists.txt | ||
| Kconfig | ||
| modem_chat.c | ||
| modem_cmux.c | ||
| modem_pipe.c | ||
| modem_pipelink.c | ||
| modem_ppp.c | ||
| modem_stats.c | ||
| modem_ubx.c | ||