Changeset 415578ef in mainline for uspace/srv/net/tl/tcp/sock.c
- Timestamp:
- 2011-12-16T18:55:14Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 522a4f9
- Parents:
- e1c6dde9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/tcp/sock.c
re1c6dde9 r415578ef 603 603 604 604 socket = (tcp_sockdata_t *)sock_core->specific_data; 605 rc = tcp_uc_close(socket->conn); 606 if (rc != EOK) { 607 async_answer_0(callid, rc); 608 return; 609 } 610 611 /* Drain incoming data. This should really be done in the background. */ 612 do { 613 trc = tcp_uc_receive(socket->conn, buffer, FRAGMENT_SIZE, 614 &data_len, &xflags); 615 } while (trc == TCP_EOK); 616 617 tcp_uc_delete(socket->conn); 605 606 if (socket->conn != NULL) { 607 rc = tcp_uc_close(socket->conn); 608 if (rc != EOK) { 609 async_answer_0(callid, rc); 610 return; 611 } 612 613 /* Drain incoming data. This should really be done in the background. */ 614 do { 615 trc = tcp_uc_receive(socket->conn, buffer, 616 FRAGMENT_SIZE, &data_len, &xflags); 617 } while (trc == TCP_EOK); 618 619 tcp_uc_delete(socket->conn); 620 } 618 621 619 622 rc = socket_destroy(net_sess, socket_id, &client->sockets, &gsock,
Note:
See TracChangeset
for help on using the changeset viewer.