buglwIP - A Lightweight TCP/IP stack - Bugs: bug #29345, Compiler error: _tcp_accepted(),...

 
 

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

bug #29345: Compiler error: _tcp_accepted(), _tcp_recved() referenced even LWIP_TCP is 0

Submitted by:  Petr Cernin <cerninp>
Submitted on:  Fri 26 Mar 2010 10:08:53 AM UTC  
 
Category: TCPSeverity: 3 - Normal
Item Group: Compiler WarningStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: CVS Head

Fri 26 Mar 2010 04:10:44 PM UTC, comment #2:

Fixed, thanks for reporting.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Fri 26 Mar 2010 10:13:04 AM UTC, comment #1:

please change the word 'even' to 'when'.

Petr Cernin <cerninp>
Fri 26 Mar 2010 10:08:53 AM UTC, original submission:

_tcp_accepted() and _tcp_recved() are referenced in netcon_drain() (in api_msg.c) even LWIP_TCP in lwipopts.h is set to 0.

There are missing #if #endif::

void
netconn_drain(struct netconn *conn)
{
void *mem;
struct pbuf *p;

/* This runs in tcpip_thread, so we don't need to lock against rx packets */

/* Delete and drain the recvmbox. */
if (sys_mbox_valid(&conn->recvmbox)) {
while (sys_mbox_tryfetch(&conn->recvmbox, &mem) != SYS_MBOX_EMPTY) {

>>>>>#if LWIP_TCP

if (conn->type == NETCONN_TCP) {
if(mem != NULL) {
p = (struct pbuf*)mem;
/* pcb might be set to NULL already by err_tcp() */
if (conn->pcb.tcp != NULL) {
tcp_recved(conn->pcb.tcp, p->tot_len);
}
pbuf_free(p);
}
} else {
netbuf_delete((struct netbuf *)mem);
}

>>>>>#else /* LWIP_TCP */

netbuf_delete((struct netbuf *)mem);

>>>>>#endif /* LWIP_TCP */

}
sys_mbox_free(&conn->recvmbox);
sys_mbox_set_invalid(&conn->recvmbox);
}

/* Delete and drain the acceptmbox. */
if (sys_mbox_valid(&conn->acceptmbox)) {
while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) {
/* Only tcp pcbs have an acceptmbox, so no need to check conn->type */
/* pcb might be set to NULL already by err_tcp() */

>>>>>#if LWIP_TCP

if (conn->pcb.tcp != NULL) {
tcp_accepted(conn->pcb.tcp);
}

>>>>>#endif /* LWIP_TCP */

netconn_delete((struct netconn *)mem);
}

sys_mbox_free(&conn->acceptmbox);
sys_mbox_set_invalid(&conn->acceptmbox);
}
}

Petr Cernin <cerninp>

 

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 cerninp (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 26 Mar 2010 04:10:44 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1