patchlwIP - A Lightweight TCP/IP stack - Patches: patch #9784, mdns_resp_add_service: fix the max...

 
 

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

patch #9784: mdns_resp_add_service: fix the max services guard.

Submitter:  Douglas <ourairquality>
Submitted:  Wed 03 Apr 2019 10:53:25 AM UTC
   
 
Category:  apps Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Planned Release:  None

Tue 30 Apr 2019 10:48:15 AM UTC, comment #3: 

Applied, thanks!

Dirk Ziegelmeier <dziegel>
Group administrator
Thu 11 Apr 2019 10:48:43 PM UTC, comment #2: 

Yes it was wrong, thanks for checking. Attached another suggestion, a proposed simplification.

Would there be any consensus to change the mdns_resp_add_service() to return an err_t and to add a separate argument in which to return the slot index? Rather than conflating the err_t and the slot index in the result as is currently done. So this would then parallel the convention used in mdns_search_service().

Would also like to change the type of the slot indexes in general to be u8_t rather than s8_t.

There a pros and cons to conflating a result number to have an interpretation as both an index and as some error value, but on the balance it usually seems best to separate them so each can have a clear type.

(file #46754)

Douglas <ourairquality>
Thu 11 Apr 2019 08:16:01 AM UTC, comment #1: 

This patch looks wrong to me.
When list full, slot will be -1 (the init value).
So the original code is fine.

Axel Lin <axellin>
Group Member
Wed 03 Apr 2019 10:53:25 AM UTC, original submission:  

This should have been checking that the list was full.

Douglas <ourairquality>

 

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dziegel (Posted a comment)
  • -email is unavailable- added by axellin (Posted a comment)
  • -email is unavailable- added by ourairquality (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
    2019-04-30 dziegel StatusNone Done
        Open/ClosedOpen Closed
    2019-04-11 ourairquality Attached File- Added 0001-mdns_resp_add_service-simplify-the-max-services-guar.patch, #46754
    2019-04-03 ourairquality Attached File- Added 0001-mdns_resp_add_service-fix-the-max-services-guard.patch, #46707

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code