Subversion Repositories HelenOS

Rev

Rev 4589 | Rev 4704 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4589 Rev 4603
Line 141... Line 141...
141
    // find the socket
141
    // find the socket
142
    socket = socket_cores_find( local_sockets, socket_id );
142
    socket = socket_cores_find( local_sockets, socket_id );
143
    if( ! socket ) return ENOTSOCK;
143
    if( ! socket ) return ENOTSOCK;
144
    socket_ports_exclude( global_sockets, socket->port );
144
    socket_ports_exclude( global_sockets, socket->port );
145
    // destroy all accepted sockets
145
    // destroy all accepted sockets
146
    while(( accepted_id = dyn_fifo_pop( & socket->accepted ))){
146
    while(( accepted_id = dyn_fifo_pop( & socket->accepted )) >= 0 ){
147
        socket_destroy( packet_phone, accepted_id, local_sockets, global_sockets );
147
        socket_destroy( packet_phone, accepted_id, local_sockets, global_sockets );
148
    }
148
    }
149
    // release all received packets
149
    // release all received packets
150
    while(( packet_id = dyn_fifo_pop( & socket->received ))){
150
    while(( packet_id = dyn_fifo_pop( & socket->received )) >= 0 ){
151
        pq_release( packet_phone, packet_id );
151
        pq_release( packet_phone, packet_id );
152
    }
152
    }
153
    dyn_fifo_destroy( & socket->received );
153
    dyn_fifo_destroy( & socket->received );
154
    dyn_fifo_destroy( & socket->accepted );
154
    dyn_fifo_destroy( & socket->accepted );
155
    socket_cores_exclude( local_sockets, socket_id );
155
    socket_cores_exclude( local_sockets, socket_id );