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

Submitted by:  Ross Philipson <rossp>
Submitted on:  Thu 05 Nov 2009 02:13:44 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned 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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project Administrator
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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by kieranm (Posted a comment)
  • -unavailable- added by rossp (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 22 Nov 2009 03:20:15 PM UTCgoldsimonStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Sun 22 Nov 2009 01:31:36 PM UTCgoldsimonStatusNone=>In Progress
      Assigned toNone=>goldsimon

    Back to the top


    Powered by Savane 3.1-cleanup1