Skip to content
Commit 01852138 authored by Marcin Niestroj's avatar Marcin Niestroj Committed by Christopher Friedt
Browse files

drivers: wifi: esp_at: fix race condition when waiting for '>'



Sending AT+CIPSEND=<...> command results in following reply:

  OK
  >

modem_cmd_send_nolock() invocation was setting command handlers for '>',
but as 'OK' was received first, it was handled as a generic reply. After
receiving 'OK' this function was unsetting command handlers. Then
modem_cmd_handler_update_cmds() was called once again in order to
register '>' handler once again. There was a small period of time where
'>' was not being handled at all.

Fix that race condition by using just introduced modem_cmd_send_ext(),
which allows to leave commands handlers in place and get rid of race
condition where expected command could be missed.

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