Skip to content

Commit

Permalink
Setting the flag correctly in the callback (#29047)
Browse files Browse the repository at this point in the history
  • Loading branch information
chirag-silabs authored and pull[bot] committed Apr 12, 2024
1 parent b31e9e4 commit 3975507
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,15 @@ int32_t wfx_rsi_disconnect()

sl_status_t join_callback_handler(sl_wifi_event_t event, char * result, uint32_t result_length, void * arg)
{
wfx_rsi.dev_state &= ~(WFX_RSI_ST_STA_CONNECTING);
temp_reset = (wfx_wifi_scan_ext_t *) malloc(sizeof(wfx_wifi_scan_ext_t));
memset(temp_reset, 0, sizeof(wfx_wifi_scan_ext_t));
if (CHECK_IF_EVENT_FAILED(event))
{
SILABS_LOG("F: Join Event received with %u bytes payload\n", result_length);
callback_status = *(sl_status_t *) result;
wfx_rsi.join_retries += 1;
wfx_rsi.dev_state &= ~(WFX_RSI_ST_STA_CONNECTING | WFX_RSI_ST_STA_CONNECTED);
wfx_rsi.dev_state &= ~(WFX_RSI_ST_STA_CONNECTED);
wfx_retry_interval_handler(is_wifi_disconnection_event, wfx_rsi.join_retries++);
if (is_wifi_disconnection_event || wfx_rsi.join_retries <= WFX_RSI_CONFIG_MAX_JOIN)
{
Expand Down

0 comments on commit 3975507

Please sign in to comment.