|
From: | Taranowski, Thomas (SWCOE) |
Subject: | [lwip-users] problem in tcp_bind |
Date: | Fri, 7 Mar 2008 11:31:34 -0500 |
I’m having a problem with my stack port, where I have some
test code that is attempting to bind to a port. I’m getting an access
violation at an unexpected location, and am currently at a loss for what the
cause could be. Any pointers or ideas would be appreciated. From what it
looks like, the list of tcp_listen_pcbs has become corrupted somehow, but I don’t
know of any likely candidates that would cause this. Thanks! err_t tcp_bind(struct tcp_pcb *pcb, struct ip_addr *ipaddr, u16_t
port) { struct tcp_pcb *cpcb; if (port == 0) { port = tcp_new_port(); } /* Check if the address already is in use. */ /* Check the listen pcbs. */ for(cpcb = (struct tcp_pcb *)tcp_listen_pcbs.pcbs; cpcb != NULL; cpcb = cpcb->next) { àif (cpcb->local_port == port) {ß Crashes here if (ip_addr_isany(&(cpcb->local_ip)) || ip_addr_isany(ipaddr) || ip_addr_cmp(&(cpcb->local_ip), ipaddr)) { return ERR_USE; } } } |
[Prev in Thread] | Current Thread | [Next in Thread] |