/[lwip]/lwip/src/core/netif.c
ViewVC logotype

Diff of /lwip/src/core/netif.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15.2.5 by likewise, Wed Jun 4 10:18:38 2003 UTC revision 1.15.2.6 by likewise, Wed Jun 4 17:15:22 2003 UTC
# Line 121  netif_set_addr(struct netif *netif,struc Line 121  netif_set_addr(struct netif *netif,struc
121    
122  void netif_remove(struct netif * netif)  void netif_remove(struct netif * netif)
123  {  {
124          if ( netif == NULL ) return;      if ( netif == NULL ) return;  
125    
126          /*  is it the first netif? */    /*  is it the first netif? */
127          if (netif_list == netif) {    if (netif_list == netif) {
128                  netif_list = netif->next;      netif_list = netif->next;
129          }        }
130          else    else {        
131          {            /*  look for netif further down the list */
132                  /*  look for netif further down the list */      struct netif * tmpNetif;
133                  struct netif * tmpNetif;      for (tmpNetif = netif_list; tmpNetif != NULL; tmpNetif = tmpNetif->next) {
                 for(tmpNetif = netif_list; tmpNetif != NULL; tmpNetif = tmpNetif->next) {  
134                          if (tmpNetif->next == netif) {                          if (tmpNetif->next == netif) {
135                                  tmpNetif->next = netif->next;                                  tmpNetif->next = netif->next;
136          break;          break;
# Line 191  netif_set_ipaddr(struct netif *netif, st Line 190  netif_set_ipaddr(struct netif *netif, st
190        if (ip_addr_cmp(&(pcb->local_ip), &(netif->ip_addr))) {        if (ip_addr_cmp(&(pcb->local_ip), &(netif->ip_addr))) {
191          /* The PCB is connected using the old ipaddr and must be aborted */          /* The PCB is connected using the old ipaddr and must be aborted */
192          struct tcp_pcb *next = pcb->next;          struct tcp_pcb *next = pcb->next;
193          DEBUGF(NETIF_DEBUG | 1, ("netif_set_ipaddr: aborting pcb %p\n", pcb));          DEBUGF(NETIF_DEBUG | 1, ("netif_set_ipaddr: aborting pcb %p\n", (void *)pcb));
194          tcp_abort(pcb);          tcp_abort(pcb);
195          pcb = next;          pcb = next;
196        } else {        } else {

Legend:
Removed from v.1.15.2.5  
changed lines
  Added in v.1.15.2.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26