Changeset 0c2d9bb in mainline for uspace/srv/net/tcp/sock.c


Ignore:
Timestamp:
2013-12-25T22:54:29Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b51cf2c
Parents:
f7a33de (diff), ac36aed (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tcp/sock.c

    rf7a33de r0c2d9bb  
    882882        tcp_sockdata_t *socket;
    883883        tcp_error_t trc;
     884        int i;
    884885        int rc;
    885886
     
    897898
    898899        if (socket->conn != NULL) {
     900                /* Close connection */
    899901                trc = tcp_uc_close(socket->conn);
    900902                if (trc != TCP_EOK && trc != TCP_ENOTEXIST) {
     
    905907        }
    906908
     909        if (socket->lconn != NULL) {
     910                /* Close listening connections */
     911                for (i = 0; i < socket->backlog; i++) {
     912                        tcp_uc_set_cstate_cb(socket->lconn[i]->conn, NULL, NULL);
     913                        trc = tcp_uc_close(socket->lconn[i]->conn);
     914                        if (trc != TCP_EOK && trc != TCP_ENOTEXIST) {
     915                                fibril_mutex_unlock(&socket->lock);
     916                                async_answer_0(callid, EBADF);
     917                                return;
     918                        }
     919
     920                        free(socket->lconn[i]);
     921                        socket->lconn[i] = NULL;
     922                }
     923        }
     924
    907925        /* Grab recv_buffer_lock because of CV wait in tcp_sock_recv_fibril() */
    908926        fibril_mutex_lock(&socket->recv_buffer_lock);
Note: See TracChangeset for help on using the changeset viewer.