Changeset 12d7710 in mainline for uspace/srv/net/tl/udp/udp.c
- Timestamp:
- 2010-03-26T22:01:28Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1faa995
- Parents:
- 4204ad9 (diff), eaf22d4 (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
r4204ad9 r12d7710 419 419 int socket_id; 420 420 size_t addrlen; 421 size_t size; 421 422 ipc_call_t answer; 422 423 int answer_count; … … 454 455 socket_id = SOCKET_GET_SOCKET_ID(call); 455 456 res = socket_create(&local_sockets, app_phone, NULL, &socket_id); 456 *SOCKET_SET_SOCKET_ID(answer) = socket_id;457 457 SOCKET_SET_SOCKET_ID(answer, socket_id); 458 458 459 if(res == EOK){ 459 460 if(tl_get_ip_packet_dimension(udp_globals.ip_phone, &udp_globals.dimensions, DEVICE_INVALID_ID, &packet_dimension) == EOK){ 460 *SOCKET_SET_DATA_FRAGMENT_SIZE(answer) = packet_dimension->content;461 SOCKET_SET_DATA_FRAGMENT_SIZE(answer, packet_dimension->content); 461 462 } 462 // *SOCKET_SET_DATA_FRAGMENT_SIZE(answer) = MAX_UDP_FRAGMENT_SIZE;463 *SOCKET_SET_HEADER_SIZE(answer) = UDP_HEADER_SIZE;463 // SOCKET_SET_DATA_FRAGMENT_SIZE(answer, MAX_UDP_FRAGMENT_SIZE); 464 SOCKET_SET_HEADER_SIZE(answer, UDP_HEADER_SIZE); 464 465 answer_count = 3; 465 466 } … … 478 479 if(res == EOK){ 479 480 fibril_rwlock_write_lock(&udp_globals.lock); 480 res = udp_sendto_message(&local_sockets, SOCKET_GET_SOCKET_ID(call), addr, addrlen, SOCKET_GET_DATA_FRAGMENTS(call), SOCKET_SET_DATA_FRAGMENT_SIZE(answer), SOCKET_GET_FLAGS(call)); 481 res = udp_sendto_message(&local_sockets, SOCKET_GET_SOCKET_ID(call), addr, addrlen, SOCKET_GET_DATA_FRAGMENTS(call), &size, SOCKET_GET_FLAGS(call)); 482 SOCKET_SET_DATA_FRAGMENT_SIZE(answer, size); 481 483 if(res != EOK){ 482 484 fibril_rwlock_write_unlock(&udp_globals.lock); … … 492 494 fibril_rwlock_write_unlock(&udp_globals.lock); 493 495 if(res > 0){ 494 *SOCKET_SET_READ_DATA_LENGTH(answer) = res;495 *SOCKET_SET_ADDRESS_LENGTH(answer) = addrlen;496 SOCKET_SET_READ_DATA_LENGTH(answer, res); 497 SOCKET_SET_ADDRESS_LENGTH(answer, addrlen); 496 498 answer_count = 3; 497 499 res = EOK;
Note:
See TracChangeset
for help on using the changeset viewer.