sock: update introductory comment for listen_sock()
authorMichael Adam <obnox@samba.org>
Fri, 8 Nov 2013 12:53:00 +0000 (13:53 +0100)
committerMichael Adam <obnox@samba.org>
Sat, 9 Nov 2013 12:34:33 +0000 (13:34 +0100)
Signed-off-by: Michael Adam <obnox@samba.org>
src/sock.c

index 8d7e90a275448877bd5c28b65de0e11a690bc75e..17f15fe4e18dd322cf1cc9c80870714d8b6f3fe3 100644 (file)
@@ -237,7 +237,13 @@ static int listen_on_one_socket(struct addrinfo *ad)
 
 /*
  * Start listening on a socket. Create a socket with the selected port.
- * The socket fd is returned upon success, -1 upon error.
+ * If the provided address is NULL, we may listen on multiple sockets,
+ * e.g. the wildcard addresse for IPv4 and IPv6, depending on what is
+ * supported. If the address is not NULL, we only listen on the first
+ * address reported by getaddrinfo that works.
+ *
+ * Upon success, the listen-fds are added to the listen_fds list
+ * and 0 is returned. Upon error,  -1 is returned.
  */
 int listen_sock (const char *addr, uint16_t port, vector_t listen_fds)
 {