We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cbf356b commit 64fe4ccCopy full SHA for 64fe4cc
1 file changed
darkhttpd.c
@@ -886,7 +886,7 @@ static void init_sockin(void) {
886
if (getsockname(sockin, (struct sockaddr *)&addrin6, &addrin_len) == -1)
887
err(1, "getsockname()");
888
printf("listening on: http://[%s]:%u/\n",
889
- get_address_text(&addrin6.sin6_addr), bindport);
+ get_address_text(&addrin6.sin6_addr), ntohs(addrin6.sin6_port));
890
} else
891
#endif
892
{
@@ -899,7 +899,7 @@ static void init_sockin(void) {
899
if (getsockname(sockin, (struct sockaddr *)&addrin, &addrin_len) == -1)
900
901
printf("listening on: http://%s:%u/\n",
902
- get_address_text(&addrin.sin_addr), bindport);
+ get_address_text(&addrin.sin_addr), ntohs(addrin.sin_port));
903
}
904
905
/* listen on socket */
0 commit comments