Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: yubiuser <[email protected]>
Signed-off-by: Dominik <[email protected]>
  • Loading branch information
DL6ER and yubiuser authored Jan 12, 2025
1 parent 9d2d295 commit e2b93cb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/webserver/webserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ static void get_server_ports(void)

// Loop over all listening ports
struct mg_server_port mgports[MAXPORTS] = { 0 };
unsigned int ports_avail = 0;
const int ports = mg_get_server_ports(ctx, MAXPORTS, mgports);

// Stop if no ports are configured
Expand Down Expand Up @@ -258,15 +257,13 @@ static void get_server_ports(void)
https_port = mgports[i].port;

// Print port information
if(ports_avail == 0)
if(i == 0)
log_info("Web server ports:");
log_info(" - %d (HTTP%s, IPv%s%s)",
mgports[i].port, mgports[i].is_ssl ? "S" : "",
mgports[i].protocol == 1 ? "4" : (mgports[i].protocol == 3 ? "6" : "4+6"),
mgports[i].is_redirect ? ", redirecting" : "");

// Increase number of available ports
ports_avail++;
}
}

Expand Down

0 comments on commit e2b93cb

Please sign in to comment.