SiliconLabs / wiseconnect

Next-generation Silicon Labs Wi-Fi API for SiWx91x chipset family.
Other
15 stars 10 forks source link

sl_net_si91x_event_dispatch_handler the if condition is incorrect #1

Closed vuhuyhop197 closed 1 year ago

vuhuyhop197 commented 1 year ago

Hi guys,

I found an issue in the function sl_net_si91x_event_dispatch_handler when I tried to use the HTTP client and MQTT client features. The logic code always runs to _handle_mqtt_client_asynchevents(data); if MQTT_CLIENT_FEATURE is enabled. The if condition should be:

#ifdef MQTT_CLIENT_FEATURE
  if ((packet->command == RSI_WLAN_REQ_EMB_MQTT_CLIENT) | (packet->command == RSI_WLAN_RSP_EMB_MQTT_PUBLISH_PKT)
      | (packet->command == RSI_WLAN_RSP_MQTT_REMOTE_TERMINATE)) {
    handle_mqtt_client_asynch_events(data);

    return;
  }
#endif
Silabs-Tarun commented 1 year ago

Thanks for sharing the concern as well as solution. This is now incorporated in latest release.