Changes in uspace/srv/net/tl/udp/udp.c [6092b56e:e417b96] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/udp/udp.c
r6092b56e re417b96 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.