Changeset 42fd4d2 in mainline
- Timestamp:
- 2013-03-14T14:12:50Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 22e80508
- Parents:
- 3ca2e36
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/udp/sock.c
r3ca2e36 r42fd4d2 90 90 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_sock_notify_data(%d)", sock_core->socket_id); 91 91 async_exch_t *exch = async_exchange_begin(sock_core->sess); 92 async_msg_5(exch, NET_SOCKET_RECEIVED, (sysarg_t) sock_core->socket_id,92 async_msg_5(exch, NET_SOCKET_RECEIVED, (sysarg_t) sock_core->socket_id, 93 93 UDP_FRAGMENT_SIZE, 0, 0, 1); 94 94 async_exchange_end(exch); … … 532 532 static void udp_sock_close(udp_client_t *client, ipc_callid_t callid, ipc_call_t call) 533 533 { 534 int socket_id;535 socket_core_t *sock_core;536 udp_sockdata_t *socket;537 int rc;538 539 534 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_sock_close()"); 540 socket_id = SOCKET_GET_SOCKET_ID(call); 541 542 sock_core = socket_cores_find(&client->sockets, socket_id); 535 int socket_id = SOCKET_GET_SOCKET_ID(call); 536 537 socket_core_t *sock_core = 538 socket_cores_find(&client->sockets, socket_id); 543 539 if (sock_core == NULL) { 544 540 async_answer_0(callid, ENOTSOCK); 545 541 return; 546 542 } 547 548 socket = (udp_sockdata_t *)sock_core->specific_data; 543 544 udp_sockdata_t *socket = 545 (udp_sockdata_t *) sock_core->specific_data; 549 546 fibril_mutex_lock(&socket->lock); 550 551 rc = socket_destroy(NULL, socket_id, &client->sockets, &gsock,547 548 int rc = socket_destroy(NULL, socket_id, &client->sockets, &gsock, 552 549 udp_free_sock_data); 553 550 if (rc != EOK) { … … 556 553 return; 557 554 } 558 555 559 556 fibril_mutex_unlock(&socket->lock); 560 557 async_answer_0(callid, EOK); … … 589 586 &sock->recv_buffer_lock); 590 587 } 591 588 592 589 log_msg(LOG_DEFAULT, LVL_DEBUG, "[] call udp_uc_receive()"); 593 590 urc = udp_uc_receive(sock->assoc, sock->recv_buffer, 594 591 UDP_FRAGMENT_SIZE, &rcvd, &xflags, &sock->recv_fsock); 595 592 sock->recv_error = urc; 596 593 597 594 udp_sock_notify_data(sock->sock_core); 598 595 599 596 if (urc != UDP_EOK) { 600 597 fibril_condvar_broadcast(&sock->recv_buffer_cv); … … 602 599 break; 603 600 } 604 601 605 602 log_msg(LOG_DEFAULT, LVL_DEBUG, "[] got data - broadcast recv_buffer_cv"); 606 603 607 604 sock->recv_buffer_used = rcvd; 608 605 fibril_mutex_unlock(&sock->recv_buffer_lock);
Note:
See TracChangeset
for help on using the changeset viewer.