patchlwIP - A Lightweight TCP/IP stack - Patches: patch #8686, udp_set_multicast_ttl() macro is...

 
 

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

patch #8686: udp_set_multicast_ttl() macro is non-function

Submitter:  Stian Sebastian Skjelstad <mywave>
Submitted:  Tue 16 Jun 2015 09:37:40 AM UTC
   
 
Category:  UDP Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Planned Release:  None

Tue 16 Jun 2015 10:07:35 AM UTC, comment #1: 

Indeed.

Patch applied, thank you :)

Sylvain

Sylvain Rochet <gradator>
Group Member
Tue 16 Jun 2015 09:37:40 AM UTC, original submission:  

Current code is

#define udp_set_multicast_ttl(pcb, mcast_ttl)      do { (pcb)->mcast_ttl = mcast_ttl; } while(0)

Problem is that mcast_ttl is both parameter name, and the member in the structure you want to access, so this code

udp_set_multicast_ttl(p, 1);

will become
p->1 = 1;

What we wanted was
p->mcast_ttl = 1;


Patch simply renames the macro parameter name into "value"


Stian Sebastian Skjelstad <mywave>

 

(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 gradator (Posted a comment)
  • -email is unavailable- added by mywave (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-06-16 gradator StatusNone Done
        Open/ClosedOpen Closed
    2015-06-16 mywave Attached File- Added 0001-Macro-parameter-name-can-not-be-the-same-as-the-stru.patch, #34232

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code