Skip to content
Commit 494fab8e authored by Bjarki Arge Andreasen's avatar Bjarki Arge Andreasen Committed by Alberto Escolar
Browse files

modem: chat: patch unintended behavior in modem_chat_run_script()



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: default avatarBjarki Arge Andreasen <bjarki@arge-andreasen.me>
parent 22061bd7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment