patchlwIP - A Lightweight TCP/IP stack - Patches: patch #10037, Fix example for MQTT application

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #10037: Fix example for MQTT application

Submitter:  Jonathan D <jona>
Submitted:  Tue 02 Mar 2021 07:39:20 PM UTC
   
 
Category:  Contrib Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Thu 04 Mar 2021 07:16:35 PM UTC, comment #1: 

Fixed, but in different way: I think it's better to allow mqtt_set_inpub_callback() before mqtt_client_connect(), so I changed mqtt_client_connect() to keep the existing callbacks.

Thanks for reporting.

Simon Goldschmidt <goldsimon>
Group administrator
Tue 02 Mar 2021 07:39:20 PM UTC, original submission:  

There is a bug in mqtt_example.c in the function mqtt_example_init. If we call first mqtt_set_inpub_callback and then mqtt_client_connect, mqtt_client_connect zeroed client and everything done in mqtt_set_inpub_callback is reset (making the call useless).

This even leads to a hard fault in mqtt_message_received because client->data_cb is called without a check.


Jonathan D <jona>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by jona (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-03-04 goldsimon StatusNone Done
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2021-03-02 jona Attached File- Added 0001-Fix-example-for-MQTT-application.patch, #50976

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code