Skip to content
Commit eae32b7e authored by Marcin Niestroj's avatar Marcin Niestroj Committed by Anas Nashif
Browse files

drivers: modem: fix race condition when waiting on cmd reply



Command was sent first, then a semaphore was reset. This semaphore could
be released by received reply even before semaphore was reset. This is
quite unlikely, but possible result of race condition.

Move k_sem_reset() call before attempt to send command over modem
interface. This makes sure that receiving reply momentarily after
sending request will always be handled properly.

Signed-off-by: default avatarMarcin Niestroj <m.niestroj@grinn-global.com>
parent 67976f86
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment