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

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

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

revision 1.35.2.2 by likewise, Wed May 14 14:38:28 2003 UTC revision 1.35.2.3 by likewise, Wed Jun 4 10:18:38 2003 UTC
# Line 337  udp_send(struct udp_pcb *pcb, struct pbu Line 337  udp_send(struct udp_pcb *pcb, struct pbu
337    
338    DEBUGF(UDP_DEBUG | DBG_TRACE | 3, ("udp_send\n"));    DEBUGF(UDP_DEBUG | DBG_TRACE | 3, ("udp_send\n"));
339    
340    /* if the PCB is not yet bound, bind it here */    /* if the PCB is not yet bound to a port, bind it here */
341    if (pcb->local_port == 0) {    if (pcb->local_port == 0) {
342      DEBUGF(UDP_DEBUG | DBG_TRACE | 2, ("udp_send: not yet bound\n"));      DEBUGF(UDP_DEBUG | DBG_TRACE | 2, ("udp_send: not yet bound to a port, binding now\n"));
343      err = udp_bind(pcb, &pcb->local_ip, pcb->local_port);      err = udp_bind(pcb, &pcb->local_ip, pcb->local_port);
344      if (err != ERR_OK) {      if (err != ERR_OK) {
345        DEBUGF(UDP_DEBUG | DBG_TRACE | 2, ("udp_send: forced bind failed\n"));        DEBUGF(UDP_DEBUG | DBG_TRACE | 2, ("udp_send: forced port bind failed\n"));
346        return err;        return err;
347      }      }
348    }    }
# Line 360  udp_send(struct udp_pcb *pcb, struct pbu Line 360  udp_send(struct udp_pcb *pcb, struct pbu
360      pbuf_chain(q, p);      pbuf_chain(q, p);
361      /* { first pbuf q points to header pbuf } */      /* { first pbuf q points to header pbuf } */
362      DEBUGF(UDP_DEBUG, ("udp_send: added header pbuf %p before given pbuf %p\n", (void *)q, (void *)p));      DEBUGF(UDP_DEBUG, ("udp_send: added header pbuf %p before given pbuf %p\n", (void *)q, (void *)p));
363      /* adding a header within p succeeded */
364    }     else {    }     else {
365      /* first pbuf q equals given pbuf */      /* first pbuf q equals given pbuf */
366      q = p;      q = p;
# Line 453  udp_bind(struct udp_pcb *pcb, struct ip_ Line 454  udp_bind(struct udp_pcb *pcb, struct ip_
454    DEBUGF(UDP_DEBUG | DBG_TRACE | 3, ("udp_bind(ipaddr = %lx, port = %u)\n", ipaddr->addr, port));    DEBUGF(UDP_DEBUG | DBG_TRACE | 3, ("udp_bind(ipaddr = %lx, port = %u)\n", ipaddr->addr, port));
455    rebind = 0;    rebind = 0;
456    /* Check for double bind and rebind of the same pcb */    /* Check for double bind and rebind of the same pcb */
457    for(ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {    for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
458      /* is this UDP PCB already on active list? */      /* is this UDP PCB already on active list? */
459      if (pcb == ipcb) {      if (pcb == ipcb) {
460        /* pcb may occur at most once in active list */        /* pcb may occur at most once in active list */

Legend:
Removed from v.1.35.2.2  
changed lines
  Added in v.1.35.2.3

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