Commit 2fc337ec authored by Michael Graff's avatar Michael Graff
Browse files

add isc_socket_isbound()

parent b9c8f437
...@@ -655,6 +655,9 @@ isc_socket_gettype(isc_socket_t *sock); ...@@ -655,6 +655,9 @@ isc_socket_gettype(isc_socket_t *sock);
* "sock" is a valid socket. * "sock" is a valid socket.
*/ */
isc_boolean_t
isc_socket_isbound(isc_socket_t *sock);
ISC_LANG_ENDDECLS ISC_LANG_ENDDECLS
#endif /* ISC_SOCKET_H */ #endif /* ISC_SOCKET_H */
...@@ -3193,3 +3193,15 @@ isc_socket_gettype(isc_socket_t *sock) ...@@ -3193,3 +3193,15 @@ isc_socket_gettype(isc_socket_t *sock)
return (sock->type); return (sock->type);
} }
isc_boolean_t
isc_socket_isbound(isc_socket_t *sock)
{
isc_boolean_t val;
LOCK(&sock->lock);
val = ((sock->bound) ? ISC_TRUE : ISC_FALSE);
UNLOCK(&sock->lock);
return (val);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment