Changeset e50cd7f in mainline for uspace/srv/net/tl/udp/udp.c
- Timestamp:
- 2011-04-17T19:17:55Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63517c2, cfbbe1d3
- Parents:
- ef354b6 (diff), 8595577b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/udp/udp.c
ref354b6 re50cd7f 499 499 device_id_t device_id; 500 500 packet_dimension_t *packet_dimension; 501 size_t size; 501 502 int rc; 503 504 /* In case of error, do not update the data fragment size. */ 505 *data_fragment_size = 0; 502 506 503 507 rc = tl_get_address_port(addr, addrlen, &dest_port); … … 539 543 packet_dimension = &udp_globals.packet_dimension; 540 544 // } 545 546 /* 547 * Update the data fragment size based on what the lower layers can 548 * handle without fragmentation, but not more than the maximum allowed 549 * for UDP. 550 */ 551 size = MAX_UDP_FRAGMENT_SIZE; 552 if (packet_dimension->content < size) 553 size = packet_dimension->content; 554 *data_fragment_size = size; 541 555 542 556 /* Read the first packet fragment */ … … 740 754 int socket_id; 741 755 size_t addrlen; 742 size_t size = 0;756 size_t size; 743 757 ipc_call_t answer; 744 758 size_t answer_count; … … 786 800 break; 787 801 802 size = MAX_UDP_FRAGMENT_SIZE; 788 803 if (tl_get_ip_packet_dimension(udp_globals.ip_phone, 789 804 &udp_globals.dimensions, DEVICE_INVALID_ID, 790 805 &packet_dimension) == EOK) { 791 SOCKET_SET_DATA_FRAGMENT_SIZE(answer,792 packet_dimension->content);806 if (packet_dimension->content < size) 807 size = packet_dimension->content; 793 808 } 794 795 // SOCKET_SET_DATA_FRAGMENT_SIZE(answer, 796 // MAX_UDP_FRAGMENT_SIZE); 809 SOCKET_SET_DATA_FRAGMENT_SIZE(answer, size); 797 810 SOCKET_SET_HEADER_SIZE(answer, UDP_HEADER_SIZE); 798 811 answer_count = 3;
Note:
See TracChangeset
for help on using the changeset viewer.