Changes in uspace/srv/net/tl/udp/udp.c [e417b96:6092b56e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/udp/udp.c
re417b96 r6092b56e 419 419 int socket_id; 420 420 size_t addrlen; 421 size_t size;422 421 ipc_call_t answer; 423 422 int answer_count; … … 455 454 socket_id = SOCKET_GET_SOCKET_ID(call); 456 455 res = socket_create(&local_sockets, app_phone, NULL, &socket_id); 457 SOCKET_SET_SOCKET_ID(answer, socket_id);458 456 *SOCKET_SET_SOCKET_ID(answer) = socket_id; 457 459 458 if(res == EOK){ 460 459 if(tl_get_ip_packet_dimension(udp_globals.ip_phone, &udp_globals.dimensions, DEVICE_INVALID_ID, &packet_dimension) == EOK){ 461 SOCKET_SET_DATA_FRAGMENT_SIZE(answer, packet_dimension->content);460 *SOCKET_SET_DATA_FRAGMENT_SIZE(answer) = packet_dimension->content; 462 461 } 463 // SOCKET_SET_DATA_FRAGMENT_SIZE(answer, MAX_UDP_FRAGMENT_SIZE);464 SOCKET_SET_HEADER_SIZE(answer, UDP_HEADER_SIZE);462 // *SOCKET_SET_DATA_FRAGMENT_SIZE(answer) = MAX_UDP_FRAGMENT_SIZE; 463 *SOCKET_SET_HEADER_SIZE(answer) = UDP_HEADER_SIZE; 465 464 answer_count = 3; 466 465 } … … 479 478 if(res == EOK){ 480 479 fibril_rwlock_write_lock(&udp_globals.lock); 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); 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)); 483 481 if(res != EOK){ 484 482 fibril_rwlock_write_unlock(&udp_globals.lock); … … 494 492 fibril_rwlock_write_unlock(&udp_globals.lock); 495 493 if(res > 0){ 496 SOCKET_SET_READ_DATA_LENGTH(answer, res);497 SOCKET_SET_ADDRESS_LENGTH(answer, addrlen);494 *SOCKET_SET_READ_DATA_LENGTH(answer) = res; 495 *SOCKET_SET_ADDRESS_LENGTH(answer) = addrlen; 498 496 answer_count = 3; 499 497 res = EOK;
Note:
See TracChangeset
for help on using the changeset viewer.