buglwIP - A Lightweight TCP/IP stack - Bugs: bug #19360, stats_display() minor problem

 
 

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

bug #19360: stats_display() minor problem

Submitted by:  Frédéric Bernon <fbernon>
Submitted on:  Tue 20 Mar 2007 04:39:24 PM UTC  
 
Category: NoneSeverity: 2 - Minor
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Frédéric Bernon <fbernon>
Open/Closed: ClosedPlanned Release: None
lwIP version: None

Tue 20 Mar 2007 06:13:42 PM UTC, comment #3:

Commited. Just change the memp_names table, and add a comment in memp.h.

Frédéric Bernon <fbernon>
Project MemberIn charge of this item.
Tue 20 Mar 2007 04:54:10 PM UTC, comment #2:

char * memp_names[] = {
"PBUF",
"RAW_PCB",
"UDP_PCB",
"TCP_PCB",
"TCP_PCB_LISTEN",
"TCP_SEG",
"NETBUF",
"NETCONN",
"TCPIP_MSG",
#if ARP_QUEUEING
"ARP_QUEUE",
#endif
"SYS_TIMEOUT"
};

And a little remark in memp.h to remember to synchronized memp_names, or a "extern const char* memp_names[MEMP_MAX];" in memp.h, and we move this table in memp.c?

What do you prefer?

Frédéric Bernon <fbernon>
Project MemberIn charge of this item.
Tue 20 Mar 2007 04:43:34 PM UTC, comment #1:

Well spotted, thanks for taking this on to fix it - should be straightforward by the sound of it.

Kieran Mansley <kieranm>
Project Administrator
Tue 20 Mar 2007 04:39:24 PM UTC, original submission:

Hi,

the stats_display use a char* table to get memp's names. But it doesn't to be "synchronised" with memp.h :

memp.h>
typedef enum {
MEMP_PBUF,
MEMP_RAW_PCB,
MEMP_UDP_PCB,
MEMP_TCP_PCB,
MEMP_TCP_PCB_LISTEN,
MEMP_TCP_SEG,

MEMP_NETBUF,
MEMP_NETCONN,
MEMP_TCPIP_MSG,
#if ARP_QUEUEING
MEMP_ARP_QUEUE,
#endif
MEMP_SYS_TIMEOUT,

MEMP_MAX
} memp_t;

stats.c>
void
stats_display(void)
{
s16_t i;
char * memp_names[] = {"PBUF", "RAW_PCB", "UDP_PCB", "TCP_PCB", "TCP_PCB_LISTEN", "TCP_SEG", "NETBUF", "NETCONN", "API_MSG", "TCP_MSG", "TIMEOUT"};
stats_display_proto(&lwip_stats.link, "LINK");
stats_display_proto(&lwip_stats.ip_frag, "IP_FRAG");
stats_display_proto(&lwip_stats.ip, "IP");
stats_display_proto(&lwip_stats.icmp, "ICMP");
stats_display_proto(&lwip_stats.udp, "UDP");
stats_display_proto(&lwip_stats.tcp, "TCP");
stats_display_pbuf(&lwip_stats.pbuf);
stats_display_mem(&lwip_stats.mem, "HEAP");
for (i = 0; i < MEMP_MAX; i++) {
stats_display_mem(&lwip_stats.memp[i], memp_names[i]);
}

}

So, stats_display() didn't display "good" names, and more, if ARP_QUEUEING is set to 1.

Frédéric Bernon <fbernon>
Project MemberIn charge of this item.

 

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 kieranm (Posted a comment)
  • -unavailable- added by fbernon (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 20 Mar 2007 06:13:42 PM UTCfbernonStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1