Changes in uspace/srv/net/tl/udp/udp.c [2e99277:a000878c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/udp/udp.c
r2e99277 ra000878c 192 192 ERROR_DECLARE; 193 193 194 measured_string_t names[] = {{ "UDP_CHECKSUM_COMPUTING", 22 }, { "UDP_AUTOBINDING", 15 }};194 measured_string_t names[] = {{ str_dup("UDP_CHECKSUM_COMPUTING"), 22 }, { str_dup("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 return EOK; 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; 393 395 } 394 396 … … 427 429 * - Answer the first IPC_M_CONNECT_TO_ME call. 428 430 */ 429 res = EOK; 430 answer_count = 0; 431 ipc_answer_0( callid, EOK ); 431 432 432 433 // The client connection is only in one fibril and therefore no additional locks are needed. … … 436 437 437 438 while( keep_on_going ){ 438 439 // answer the call440 answer_call( callid, res, & answer, answer_count );441 442 439 // refresh data 443 440 refresh_answer( & answer, & answer_count ); 444 441 445 // get the next call446 442 callid = async_get_call( & call ); 447 448 // process the call 443 // printf( "message %d\n", IPC_GET_METHOD( * call )); 444 449 445 switch( IPC_GET_METHOD( call )){ 450 446 case IPC_M_PHONE_HUNGUP: 451 447 keep_on_going = false; 452 res = E HANGUP;448 res = EOK; 453 449 break; 454 450 case NET_SOCKET: … … 518 514 break; 519 515 } 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 res;525 return EOK; 526 526 } 527 527 … … 618 618 header->checksum = 0; 619 619 if( udp_globals.checksum_computing ){ 620 // update the pseudo header 621 if( ERROR_OCCURRED( ip_client_set_pseudo_header_data_length( ip_header, headerlen, total_length + UDP_HEADER_SIZE ))){ 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))){ 622 624 free( ip_header ); 623 625 return udp_release_and_return( packet, ERROR_CODE ); 624 626 } 625 // finish the checksum computation626 627 checksum = compute_checksum( checksum, ip_header, headerlen ); 627 628 checksum = compute_checksum( checksum, ( uint8_t * ) header, sizeof( * header ));
Note:
See TracChangeset
for help on using the changeset viewer.