Skip to content

Commit

Permalink
http_server.{c,h}: make clear that IPv4 or IPv6 is used by http_serve…
Browse files Browse the repository at this point in the history
…r_init()
  • Loading branch information
DDvO committed Jul 31, 2024
1 parent 9d26c79 commit 8857ed5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/include/http_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

# ifndef OPENSSL_NO_SOCK
/*-
* Initialize an HTTP server, setting up its listening BIO
* Initialize an HTTP server, setting up its listening BIO, using IPv4 or v6
* prog: the name of the current app
* port: the port to listen on
* verbosity: the level of verbosity to use, or -1 for default: LOG_INFO
Expand Down
1 change: 1 addition & 0 deletions apps/lib/http_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ BIO *http_server_init(const char *prog, const char *port, int verb)
goto err;
acbio = BIO_new(BIO_s_accept());
if (acbio == NULL
|| BIO_set_accept_ip_family(acbio, BIO_FAMILY_IPANY) <= 0 /* IPv4/6 */
|| BIO_set_bind_mode(acbio, BIO_BIND_REUSEADDR) <= 0
|| BIO_set_accept_name(acbio, name) <= 0) {
log_HTTP(prog, LOG_ERR, "error setting up accept BIO");
Expand Down

0 comments on commit 8857ed5

Please sign in to comment.