Changeset ccb5165 in mainline for uspace/srv/net/udp/sock.c
- Timestamp:
- 2013-04-20T07:28:39Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0041cd6d
- Parents:
- 6d717a4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/udp/sock.c
r6d717a4 rccb5165 538 538 int socket_id = SOCKET_GET_SOCKET_ID(call); 539 539 540 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_close() - find core"); 540 541 socket_core_t *sock_core = 541 542 socket_cores_find(&client->sockets, socket_id); 542 543 if (sock_core == NULL) { 544 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_close() - core not found"); 543 545 async_answer_0(callid, ENOTSOCK); 544 546 return; 545 547 } 546 548 549 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_close() - spec data"); 547 550 udp_sockdata_t *socket = 548 551 (udp_sockdata_t *) sock_core->specific_data; 552 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_close() - lock socket"); 549 553 fibril_mutex_lock(&socket->lock); 550 554 555 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_close() - lock socket buffer"); 551 556 fibril_mutex_lock(&socket->recv_buffer_lock); 552 557 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_close - set socket->sock_core = NULL"); … … 601 606 &sock->recv_buffer_lock); 602 607 } 603 608 609 fibril_mutex_unlock(&sock->recv_buffer_lock); 610 604 611 log_msg(LOG_DEFAULT, LVL_DEBUG, "[] call udp_uc_receive()"); 605 612 urc = udp_uc_receive(sock->assoc, sock->recv_buffer, 606 613 UDP_FRAGMENT_SIZE, &rcvd, &xflags, &sock->recv_fsock); 614 fibril_mutex_lock(&sock->recv_buffer_lock); 607 615 sock->recv_error = urc; 608 616 … … 611 619 if (sock->sock_core != NULL) 612 620 udp_sock_notify_data(sock->sock_core); 613 621 614 622 if (urc != UDP_EOK) { 615 623 log_msg(LOG_DEFAULT, LVL_DEBUG, "[] urc != UDP_EOK, break"); … … 617 625 break; 618 626 } 619 627 620 628 log_msg(LOG_DEFAULT, LVL_DEBUG, "[] got data - broadcast recv_buffer_cv"); 621 629 622 630 sock->recv_buffer_used = rcvd; 623 631 fibril_condvar_broadcast(&sock->recv_buffer_cv);
Note:
See TracChangeset
for help on using the changeset viewer.