buglwIP - A Lightweight TCP/IP stack - Bugs: bug #27948, Incorrect logging levels used in...

 
 

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

bug #27948: Incorrect logging levels used in various places

Submitter:  Ross Philipson <rossp>
Submitted:  Thu 05 Nov 2009 02:13:44 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  1.3.1

Sun 22 Nov 2009 03:20:16 PM UTC, comment #3: 

Fised logging levels in etharp, dhcp, mem, memp, netif, raw, tcp_out, udp, autoip an ip.c: they all used | 1, | 2 or | 3 -> converted correct define ore removed where not applicable.

Thanks for reporting.

Simon Goldschmidt <goldsimon>
Group administrator
Sun 22 Nov 2009 01:31:36 PM UTC, comment #2: 

Ross Philipson wrote (on lwip-devel):

> OK, here is a patch to fix the ones that I found. The only place
> I found any obvious ones was in pbuf.c but there are many parts
> of the lwIP I am not using so there could be others.


- When replying to bugs, please reply here in the bug tracker as it makes it easier to find your response later

- The patch you attached removes LWIP_DBG_TRACE, which is not used in a wrong way

What's really wrong (not only in pbuf.c) is to use code like "| 3": if a logging level is provided, then the corresponding define must be used. We can then search for the defines and see whether the logging level is used correctly.

I just did that for pbuf.c and will do it for other files.

Simon Goldschmidt <goldsimon>
Group administrator
Thu 05 Nov 2009 02:24:24 PM UTC, comment #1: 

If you can hunt out the others, or at least most of them, and generate a patch, that would be very helpful

Kieran Mansley <kieranm>
Group Member
Thu 05 Nov 2009 02:13:44 PM UTC, original submission:  

The debug.h header defines the 3 logging for warning, error and severe (plus 0 for debug tracing) but it is not used correctly in a number of places. A good example is in pbuf.c; messages like the following are clearly informational yet logged as severe:

LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE | 3, ("pbuf_alloc(length=%"U16_F")\n", length));


Ross Philipson <rossp>

 

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

No files currently attached

 

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 kieranm (Posted a comment)
  • -email is unavailable- added by rossp (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
    2009-11-22 goldsimon StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2009-11-22 goldsimon StatusNone In Progress
        Assigned toNone goldsimon

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code