Changes in uspace/srv/net/tl/udp/udp.c [5fe7692:348c589] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/udp/udp.c
r5fe7692 r348c589 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.