/[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.26 by jani, Fri Mar 21 10:48:22 2003 UTC revision 1.27 by likewise, Mon Mar 24 12:57:00 2003 UTC
# Line 339  udp_send(struct udp_pcb *pcb, struct pbu Line 339  udp_send(struct udp_pcb *pcb, struct pbu
339       to be allocated. */       to be allocated. */
340    hdr = NULL;    hdr = NULL;
341        
342    /* succeeding in adding an UDP header to first given pbuf in chain? */    /* not enough space to add an UDP header to first pbuf in given p chain? */
343    if(pbuf_header(p, UDP_HLEN)) {    if(pbuf_header(p, UDP_HLEN)) {
344      /* allocate header in new pbuf */      /* allocate header in new pbuf */
345      hdr = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM);      hdr = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM);
# Line 405  udp_send(struct udp_pcb *pcb, struct pbu Line 405  udp_send(struct udp_pcb *pcb, struct pbu
405      /* output to IP */      /* output to IP */
406      err = ip_output_if(p, src_ip, &pcb->remote_ip, UDP_TTL, IP_PROTO_UDP, netif);          err = ip_output_if(p, src_ip, &pcb->remote_ip, UDP_TTL, IP_PROTO_UDP, netif);    
407    }    }
408    /* dechain and free the header pbuf */    /* dechain and free any header pbuf */
409    if(hdr != NULL) {    if(hdr != NULL) {
410        /* detach the header prepended earlier */
411        pbuf_dechain(hdr);
412        /* free the header */
413      pbuf_free(hdr);      pbuf_free(hdr);
414    }    }
415        

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

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