Rev 4726 | Rev 4736 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4726 | Rev 4729 | ||
---|---|---|---|
Line 556... | Line 556... | ||
556 | int closesocket( int socket_id ){ |
556 | int closesocket( int socket_id ){ |
557 | ERROR_DECLARE; |
557 | ERROR_DECLARE; |
558 | 558 | ||
559 | socket_ref socket; |
559 | socket_ref socket; |
560 | 560 | ||
561 | fibril_rwlock_write_unlock( & socket_globals.lock ); |
561 | fibril_rwlock_write_lock( & socket_globals.lock ); |
562 | socket = sockets_find( socket_get_sockets(), socket_id ); |
562 | socket = sockets_find( socket_get_sockets(), socket_id ); |
563 | if( ! socket ){ |
563 | if( ! socket ){ |
564 | fibril_rwlock_write_unlock( & socket_globals.lock ); |
564 | fibril_rwlock_write_unlock( & socket_globals.lock ); |
565 | return ENOTSOCK; |
565 | return ENOTSOCK; |
566 | } |
566 | } |