File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -3338,6 +3338,7 @@ mg_get_server_ports(const struct mg_context *ctx,
33383338 ports [cnt ].is_ssl = ctx -> listening_sockets [i ].is_ssl ;
33393339 ports [cnt ].is_redirect = ctx -> listening_sockets [i ].ssl_redir ;
33403340 ports [cnt ].is_optional = ctx -> listening_sockets [i ].is_optional ;
3341+ ports [cnt ].is_bound = ctx -> listening_sockets [i ].sock != INVALID_SOCKET ;
33413342
33423343 if (ctx -> listening_sockets [i ].lsa .sa .sa_family == AF_INET ) {
33433344 /* IPv4 */
Original file line number Diff line number Diff line change @@ -725,7 +725,7 @@ struct mg_server_port {
725725 int is_ssl ; /* https port: 0 = no, 1 = yes */
726726 int is_redirect ; /* redirect all requests: 0 = no, 1 = yes */
727727 int is_optional ; /* optional: 0 = no, 1 = yes */
728- int _reserved2 ;
728+ int is_bound ; /* bound: 0 = no, 1 = yes, relevant for optional ports */
729729 int _reserved3 ;
730730 int _reserved4 ;
731731};
You can’t perform that action at this time.
0 commit comments