Changes in uspace/srv/net/tl/udp/udp.c [a000878c:2e99277] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/udp/udp.c
ra000878c r2e99277 192 192 ERROR_DECLARE; 193 193 194 measured_string_t names[] = {{ str_dup("UDP_CHECKSUM_COMPUTING"), 22 }, { str_dup("UDP_AUTOBINDING"), 15 }};194 measured_string_t names[] = {{ "UDP_CHECKSUM_COMPUTING", 22 }, { "UDP_AUTOBINDING", 15 }}; 195 195 measured_string_ref configuration; 196 196 size_t count = sizeof( names ) / sizeof( measured_string_t ); … … 390 390 fibril_rwlock_write_unlock( & udp_globals.lock ); 391 391 async_msg_5( socket->phone, NET_SOCKET_RECEIVED, ( ipcarg_t ) socket->socket_id, packet_dimension->content, 0, 0, ( ipcarg_t ) fragments ); 392 /* fibril_rwlock_write_unlock( & udp_globals.lock ); 393 async_msg_5( socket->phone, NET_SOCKET_RECEIVED, ( ipcarg_t ) socket->socket_id, 0, 0, 0, ( ipcarg_t ) fragments ); 394 */ return EOK; 392 return EOK; 395 393 } 396 394 … … 429 427 * - Answer the first IPC_M_CONNECT_TO_ME call. 430 428 */ 431 ipc_answer_0( callid, EOK ); 429 res = EOK; 430 answer_count = 0; 432 431 433 432 // The client connection is only in one fibril and therefore no additional locks are needed. … … 437 436 438 437 while( keep_on_going ){ 438 439 // answer the call 440 answer_call( callid, res, & answer, answer_count ); 441 439 442 // refresh data 440 443 refresh_answer( & answer, & answer_count ); 441 444 445 // get the next call 442 446 callid = async_get_call( & call ); 443 // printf( "message %d\n", IPC_GET_METHOD( * call )); 444 447 448 // process the call 445 449 switch( IPC_GET_METHOD( call )){ 446 450 case IPC_M_PHONE_HUNGUP: 447 451 keep_on_going = false; 448 res = E OK;452 res = EHANGUP; 449 453 break; 450 454 case NET_SOCKET: … … 514 518 break; 515 519 } 516 517 // printf( "res = %d\n", res );518 519 answer_call( callid, res, & answer, answer_count );520 520 } 521 521 … … 523 523 socket_cores_release( udp_globals.net_phone, & local_sockets, & udp_globals.sockets, NULL ); 524 524 525 return EOK;525 return res; 526 526 } 527 527 … … 618 618 header->checksum = 0; 619 619 if( udp_globals.checksum_computing ){ 620 // if( ERROR_OCCURRED( ip_get_route_req( udp_globals.ip_phone, IPPROTO_UDP, addr, addrlen, & device_id, & ip_header, & headerlen ))){ 621 // return udp_release_and_return( packet, ERROR_CODE ); 622 // } 623 if( ERROR_OCCURRED( ip_client_set_pseudo_header_data_length( ip_header, headerlen, total_length + UDP_HEADER_SIZE))){ 620 // update the pseudo header 621 if( ERROR_OCCURRED( ip_client_set_pseudo_header_data_length( ip_header, headerlen, total_length + UDP_HEADER_SIZE ))){ 624 622 free( ip_header ); 625 623 return udp_release_and_return( packet, ERROR_CODE ); 626 624 } 625 // finish the checksum computation 627 626 checksum = compute_checksum( checksum, ip_header, headerlen ); 628 627 checksum = compute_checksum( checksum, ( uint8_t * ) header, sizeof( * header ));
Note:
See TracChangeset
for help on using the changeset viewer.