Rev 4726 | Rev 4738 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4726 | Rev 4730 | ||
---|---|---|---|
Line 78... | Line 78... | ||
78 | socket_pointer = socket_ports_find( global_sockets, address_in->sin_port ); |
78 | socket_pointer = socket_ports_find( global_sockets, address_in->sin_port ); |
79 | if( socket_pointer ){ |
79 | if( socket_pointer ){ |
80 | // already used |
80 | // already used |
81 | return EADDRINUSE; |
81 | return EADDRINUSE; |
82 | } |
82 | } |
83 | // disbind if bound |
83 | // unbind if bound |
84 | socket_ports_exclude( global_sockets, socket->port ); |
84 | socket_ports_exclude( global_sockets, socket->port ); |
85 | socket->port = -1; |
85 | socket->port = -1; |
86 | return socket_bind_insert( global_sockets, socket, address_in->sin_port ); |
86 | return socket_bind_insert( global_sockets, socket, address_in->sin_port ); |
87 | break; |
87 | break; |
88 | // TODO IPv6 |
88 | // TODO IPv6 |