Changeset de229f8e in mainline
- Timestamp:
- 2010-11-04T20:25:27Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a63ff7d
- Parents:
- f3cb50e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/udp/udp.c
rf3cb50e rde229f8e 636 636 // get udp header 637 637 data = packet_get_data(packet); 638 if (!data) { 639 pq_release_remote(udp_globals.net_phone, packet_id); 640 return NO_DATA; 641 } 638 if (!data) 639 return udp_release_and_return(packet, NO_DATA); 642 640 header = (udp_header_ref) data; 643 641 … … 645 643 result = packet_get_addr(packet, (uint8_t **) &addr, NULL); 646 644 rc = tl_set_address_port(addr, result, ntohs(header->source_port)); 647 if (rc != EOK) { 648 pq_release_remote(udp_globals.net_phone, packet_id); 649 return rc; 650 } 645 if (rc != EOK) 646 return udp_release_and_return(packet, rc); 651 647 *addrlen = (size_t) result; 652 648 … … 666 662 return rc; 667 663 668 // release the packet669 664 dyn_fifo_pop(&socket->received); 670 pq_release_remote(udp_globals.net_phone, packet_get_id(packet)); 671 672 // return the total length 673 return (int) length; 665 666 // release the packet and return the total length 667 return udp_release_and_return(packet, (int) length); 674 668 } 675 669
Note:
See TracChangeset
for help on using the changeset viewer.