|
@@ -223,16 +223,18 @@ static void print_str_array(struct cli_session *cs, const char **sa) {
|
|
|
}
|
|
|
|
|
|
static const char *get_flag(int val) {
|
|
|
- if (val)
|
|
|
+ if (val) {
|
|
|
return "ON";
|
|
|
+ }
|
|
|
return "OFF";
|
|
|
}
|
|
|
|
|
|
static void cli_print_flag(struct cli_session *cs, int flag, const char *name, int changeable) {
|
|
|
if (cs && cs->ts && name) {
|
|
|
const char *sc = "";
|
|
|
- if (changeable)
|
|
|
+ if (changeable) {
|
|
|
sc = " (*)";
|
|
|
+ }
|
|
|
myprintf(cs, " %s: %s%s\n", name, get_flag(flag), sc);
|
|
|
}
|
|
|
}
|
|
@@ -240,23 +242,26 @@ static void cli_print_flag(struct cli_session *cs, int flag, const char *name, i
|
|
|
static void cli_print_uint(struct cli_session *cs, unsigned long value, const char *name, int changeable) {
|
|
|
if (cs && cs->ts && name) {
|
|
|
const char *sc = "";
|
|
|
- if (changeable == 1)
|
|
|
+ if (changeable == 1) {
|
|
|
sc = " (*)";
|
|
|
- else if (changeable == 2)
|
|
|
+ } else if (changeable == 2) {
|
|
|
sc = " (**)";
|
|
|
+ }
|
|
|
myprintf(cs, " %s: %lu%s\n", name, value, sc);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
static void cli_print_str(struct cli_session *cs, const char *value, const char *name, int changeable) {
|
|
|
if (cs && cs->ts && name && value) {
|
|
|
- if (value[0] == 0)
|
|
|
+ if (value[0] == 0) {
|
|
|
value = "empty";
|
|
|
+ }
|
|
|
const char *sc = "";
|
|
|
- if (changeable == 1)
|
|
|
+ if (changeable == 1) {
|
|
|
sc = " (*)";
|
|
|
- else if (changeable == 2)
|
|
|
+ } else if (changeable == 2) {
|
|
|
sc = " (**)";
|
|
|
+ }
|
|
|
myprintf(cs, " %s: %s%s\n", name, value, sc);
|
|
|
}
|
|
|
}
|
|
@@ -264,15 +269,17 @@ static void cli_print_str(struct cli_session *cs, const char *value, const char
|
|
|
static void cli_print_addr(struct cli_session *cs, ioa_addr *value, int use_port, const char *name, int changeable) {
|
|
|
if (cs && cs->ts && name && value) {
|
|
|
const char *sc = "";
|
|
|
- if (changeable == 1)
|
|
|
+ if (changeable == 1) {
|
|
|
sc = " (*)";
|
|
|
- else if (changeable == 2)
|
|
|
+ } else if (changeable == 2) {
|
|
|
sc = " (**)";
|
|
|
+ }
|
|
|
char s[256];
|
|
|
- if (!use_port)
|
|
|
+ if (!use_port) {
|
|
|
addr_to_string_no_port(value, (uint8_t *)s);
|
|
|
- else
|
|
|
+ } else {
|
|
|
addr_to_string(value, (uint8_t *)s);
|
|
|
+ }
|
|
|
myprintf(cs, " %s: %s%s\n", name, s, sc);
|
|
|
}
|
|
|
}
|
|
@@ -281,17 +288,19 @@ static void cli_print_addr_list(struct cli_session *cs, turn_server_addrs_list_t
|
|
|
int changeable) {
|
|
|
if (cs && cs->ts && name && value && value->size && value->addrs) {
|
|
|
const char *sc = "";
|
|
|
- if (changeable == 1)
|
|
|
+ if (changeable == 1) {
|
|
|
sc = " (*)";
|
|
|
- else if (changeable == 2)
|
|
|
+ } else if (changeable == 2) {
|
|
|
sc = " (**)";
|
|
|
+ }
|
|
|
char s[256];
|
|
|
size_t i;
|
|
|
for (i = 0; i < value->size; i++) {
|
|
|
- if (!use_port)
|
|
|
+ if (!use_port) {
|
|
|
addr_to_string_no_port(&(value->addrs[i]), (uint8_t *)s);
|
|
|
- else
|
|
|
+ } else {
|
|
|
addr_to_string(&(value->addrs[i]), (uint8_t *)s);
|
|
|
+ }
|
|
|
myprintf(cs, " %s: %s%s\n", name, s, sc);
|
|
|
}
|
|
|
}
|
|
@@ -300,14 +309,16 @@ static void cli_print_addr_list(struct cli_session *cs, turn_server_addrs_list_t
|
|
|
static void cli_print_str_array(struct cli_session *cs, char **value, size_t sz, const char *name, int changeable) {
|
|
|
if (cs && cs->ts && name && value && sz) {
|
|
|
const char *sc = "";
|
|
|
- if (changeable == 1)
|
|
|
+ if (changeable == 1) {
|
|
|
sc = " (*)";
|
|
|
- else if (changeable == 2)
|
|
|
+ } else if (changeable == 2) {
|
|
|
sc = " (**)";
|
|
|
+ }
|
|
|
size_t i;
|
|
|
for (i = 0; i < sz; i++) {
|
|
|
- if (value[i])
|
|
|
+ if (value[i]) {
|
|
|
myprintf(cs, " %s: %s%s\n", name, value[i], sc);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -315,10 +326,11 @@ static void cli_print_str_array(struct cli_session *cs, char **value, size_t sz,
|
|
|
static void cli_print_ip_range_list(struct cli_session *cs, ip_range_list_t *value, const char *name, int changeable) {
|
|
|
if (cs && cs->ts && name && value && value->ranges_number && value->rs) {
|
|
|
const char *sc = "";
|
|
|
- if (changeable == 1)
|
|
|
+ if (changeable == 1) {
|
|
|
sc = " (*)";
|
|
|
- else if (changeable == 2)
|
|
|
+ } else if (changeable == 2) {
|
|
|
sc = " (**)";
|
|
|
+ }
|
|
|
size_t i;
|
|
|
for (i = 0; i < value->ranges_number; ++i) {
|
|
|
if (value->rs[i].realm[0]) {
|
|
@@ -414,28 +426,34 @@ static int print_session(ur_map_key_type key, ur_map_value_type value, void *arg
|
|
|
struct cli_session *cs = csarg->cs;
|
|
|
struct turn_session_info *tsi = (struct turn_session_info *)value;
|
|
|
|
|
|
- if (cs->realm[0] && strcmp(cs->realm, tsi->realm))
|
|
|
+ if (cs->realm[0] && strcmp(cs->realm, tsi->realm)) {
|
|
|
return 0;
|
|
|
+ }
|
|
|
|
|
|
- if (cs->origin[0] && strcmp(cs->origin, tsi->origin))
|
|
|
+ if (cs->origin[0] && strcmp(cs->origin, tsi->origin)) {
|
|
|
return 0;
|
|
|
+ }
|
|
|
|
|
|
if (csarg->users) {
|
|
|
|
|
|
const char *pn = csarg->pname;
|
|
|
if (pn[0]) {
|
|
|
if (!strcmp(pn, "TLS") || !strcmp(pn, "tls") || !strcmp(pn, "Tls")) {
|
|
|
- if ((tsi->client_protocol != TLS_SOCKET) && (tsi->client_protocol != TLS_SCTP_SOCKET))
|
|
|
+ if ((tsi->client_protocol != TLS_SOCKET) && (tsi->client_protocol != TLS_SCTP_SOCKET)) {
|
|
|
return 0;
|
|
|
+ }
|
|
|
} else if (!strcmp(pn, "DTLS") || !strcmp(pn, "dtls") || !strcmp(pn, "Dtls")) {
|
|
|
- if (tsi->client_protocol != DTLS_SOCKET)
|
|
|
+ if (tsi->client_protocol != DTLS_SOCKET) {
|
|
|
return 0;
|
|
|
+ }
|
|
|
} else if (!strcmp(pn, "TCP") || !strcmp(pn, "tcp") || !strcmp(pn, "Tcp")) {
|
|
|
- if ((tsi->client_protocol != TCP_SOCKET) && (tsi->client_protocol != SCTP_SOCKET))
|
|
|
+ if ((tsi->client_protocol != TCP_SOCKET) && (tsi->client_protocol != SCTP_SOCKET)) {
|
|
|
return 0;
|
|
|
+ }
|
|
|
} else if (!strcmp(pn, "UDP") || !strcmp(pn, "udp") || !strcmp(pn, "Udp")) {
|
|
|
- if (tsi->client_protocol != UDP_SOCKET)
|
|
|
+ if (tsi->client_protocol != UDP_SOCKET) {
|
|
|
return 0;
|
|
|
+ }
|
|
|
} else {
|
|
|
return 0;
|
|
|
}
|
|
@@ -455,21 +473,25 @@ static int print_session(ur_map_key_type key, ur_map_value_type value, void *arg
|
|
|
} else {
|
|
|
if (csarg->username[0]) {
|
|
|
if (csarg->exact_match) {
|
|
|
- if (strcmp((char *)tsi->username, csarg->username))
|
|
|
+ if (strcmp((char *)tsi->username, csarg->username)) {
|
|
|
return 0;
|
|
|
+ }
|
|
|
} else {
|
|
|
- if (!strstr((char *)tsi->username, csarg->username))
|
|
|
+ if (!strstr((char *)tsi->username, csarg->username)) {
|
|
|
return 0;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (cs->f || (unsigned long)csarg->counter < (unsigned long)cli_max_output_sessions) {
|
|
|
myprintf(cs, "\n");
|
|
|
myprintf(cs, " %lu) id=%018llu, user <%s>:\n", (unsigned long)(csarg->counter + 1),
|
|
|
(unsigned long long)tsi->id, tsi->username);
|
|
|
- if (tsi->realm[0])
|
|
|
+ if (tsi->realm[0]) {
|
|
|
myprintf(cs, " realm: %s\n", tsi->realm);
|
|
|
- if (tsi->origin[0])
|
|
|
+ }
|
|
|
+ if (tsi->origin[0]) {
|
|
|
myprintf(cs, " origin: %s\n", tsi->origin);
|
|
|
+ }
|
|
|
if (turn_time_before(csarg->ct, tsi->start_time)) {
|
|
|
myprintf(cs, " started: undefined time\n");
|
|
|
} else {
|
|
@@ -483,14 +505,18 @@ static int print_session(ur_map_key_type key, ur_map_value_type value, void *arg
|
|
|
myprintf(cs, " client protocol %s, relay protocol %s\n", socket_type_name(tsi->client_protocol),
|
|
|
socket_type_name(tsi->peer_protocol));
|
|
|
{
|
|
|
- if (!tsi->local_addr_data.saddr[0])
|
|
|
+ if (!tsi->local_addr_data.saddr[0]) {
|
|
|
addr_to_string(&(tsi->local_addr_data.addr), (uint8_t *)tsi->local_addr_data.saddr);
|
|
|
- if (!tsi->remote_addr_data.saddr[0])
|
|
|
+ }
|
|
|
+ if (!tsi->remote_addr_data.saddr[0]) {
|
|
|
addr_to_string(&(tsi->remote_addr_data.addr), (uint8_t *)tsi->remote_addr_data.saddr);
|
|
|
- if (!tsi->relay_addr_data_ipv4.saddr[0])
|
|
|
+ }
|
|
|
+ if (!tsi->relay_addr_data_ipv4.saddr[0]) {
|
|
|
addr_to_string(&(tsi->relay_addr_data_ipv4.addr), (uint8_t *)tsi->relay_addr_data_ipv4.saddr);
|
|
|
- if (!tsi->relay_addr_data_ipv6.saddr[0])
|
|
|
+ }
|
|
|
+ if (!tsi->relay_addr_data_ipv6.saddr[0]) {
|
|
|
addr_to_string(&(tsi->relay_addr_data_ipv6.addr), (uint8_t *)tsi->relay_addr_data_ipv6.saddr);
|
|
|
+ }
|
|
|
myprintf(cs, " client addr %s, server addr %s\n", tsi->remote_addr_data.saddr,
|
|
|
tsi->local_addr_data.saddr);
|
|
|
if (tsi->relay_addr_data_ipv4.saddr[0]) {
|
|
@@ -506,8 +532,9 @@ static int print_session(ur_map_key_type key, ur_map_value_type value, void *arg
|
|
|
myprintf(cs, " TLS method: %s\n", tsi->tls_method);
|
|
|
myprintf(cs, " TLS cipher: %s\n", tsi->tls_cipher);
|
|
|
}
|
|
|
- if (tsi->bps)
|
|
|
+ if (tsi->bps) {
|
|
|
myprintf(cs, " Max throughput: %lu bytes per second\n", (unsigned long)tsi->bps);
|
|
|
+ }
|
|
|
myprintf(cs, " usage: rp=%lu, rb=%lu, sp=%lu, sb=%lu\n", (unsigned long)(tsi->received_packets),
|
|
|
(unsigned long)(tsi->received_bytes), (unsigned long)(tsi->sent_packets),
|
|
|
(unsigned long)(tsi->sent_bytes));
|
|
@@ -517,14 +544,16 @@ static int print_session(ur_map_key_type key, ur_map_value_type value, void *arg
|
|
|
myprintf(cs, " peers:\n");
|
|
|
size_t i;
|
|
|
for (i = 0; i < tsi->main_peers_size; ++i) {
|
|
|
- if (!(tsi->main_peers_data[i].saddr[0]))
|
|
|
+ if (!(tsi->main_peers_data[i].saddr[0])) {
|
|
|
addr_to_string(&(tsi->main_peers_data[i].addr), (uint8_t *)tsi->main_peers_data[i].saddr);
|
|
|
+ }
|
|
|
myprintf(cs, " %s\n", tsi->main_peers_data[i].saddr);
|
|
|
}
|
|
|
if (tsi->extra_peers_size && tsi->extra_peers_data) {
|
|
|
for (i = 0; i < tsi->extra_peers_size; ++i) {
|
|
|
- if (!(tsi->extra_peers_data[i].saddr[0]))
|
|
|
+ if (!(tsi->extra_peers_data[i].saddr[0])) {
|
|
|
addr_to_string(&(tsi->extra_peers_data[i].addr), (uint8_t *)tsi->extra_peers_data[i].saddr);
|
|
|
+ }
|
|
|
myprintf(cs, " %s\n", tsi->extra_peers_data[i].saddr);
|
|
|
}
|
|
|
}
|
|
@@ -547,10 +576,12 @@ static void cancel_session(struct cli_session *cs, const char *ssid) {
|
|
|
static void print_sessions(struct cli_session *cs, const char *pn, int exact_match, int print_users) {
|
|
|
if (cs && cs->ts && pn) {
|
|
|
|
|
|
- while (pn[0] == ' ')
|
|
|
+ while (pn[0] == ' ') {
|
|
|
++pn;
|
|
|
- if (pn[0] == '*')
|
|
|
+ }
|
|
|
+ if (pn[0] == '*') {
|
|
|
++pn;
|
|
|
+ }
|
|
|
|
|
|
const char *uname = "";
|
|
|
if (!print_users) {
|
|
@@ -590,11 +621,13 @@ static void print_sessions(struct cli_session *cs, const char *pn, int exact_mat
|
|
|
snprintf(ts, sizeof(ts), " Total sessions");
|
|
|
if (cs->realm[0]) {
|
|
|
snprintf(ts + strlen(ts), sizeof(ts) - strlen(ts), " for realm %s", cs->realm);
|
|
|
- if (cs->origin[0])
|
|
|
+ if (cs->origin[0]) {
|
|
|
snprintf(ts + strlen(ts), sizeof(ts) - strlen(ts), " and for origin %s", cs->origin);
|
|
|
+ }
|
|
|
} else {
|
|
|
- if (cs->origin[0])
|
|
|
+ if (cs->origin[0]) {
|
|
|
snprintf(ts + strlen(ts), sizeof(ts) - strlen(ts), " for origin %s", cs->origin);
|
|
|
+ }
|
|
|
}
|
|
|
snprintf(ts + strlen(ts), sizeof(ts) - strlen(ts), ": %lu", (unsigned long)arg.counter);
|
|
|
myprintf(cs, "%s\n", ts);
|
|
@@ -610,18 +643,21 @@ static void print_sessions(struct cli_session *cs, const char *pn, int exact_mat
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (arg.user_counters)
|
|
|
+ if (arg.user_counters) {
|
|
|
free(arg.user_counters);
|
|
|
+ }
|
|
|
if (arg.user_names) {
|
|
|
size_t i;
|
|
|
for (i = 0; i < arg.users_number; ++i) {
|
|
|
- if (arg.user_names[i])
|
|
|
+ if (arg.user_names[i]) {
|
|
|
free(arg.user_names[i]);
|
|
|
+ }
|
|
|
}
|
|
|
free(arg.user_names);
|
|
|
}
|
|
|
- if (arg.users)
|
|
|
+ if (arg.users) {
|
|
|
ur_string_map_free(&arg.users);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -659,21 +695,23 @@ static void cli_print_configuration(struct cli_session *cs) {
|
|
|
|
|
|
myprintf(cs, "\n");
|
|
|
|
|
|
- if (turn_params.cipher_list[0])
|
|
|
+ if (turn_params.cipher_list[0]) {
|
|
|
cli_print_str(cs, turn_params.cipher_list, "cipher-list", 0);
|
|
|
- else
|
|
|
+ } else {
|
|
|
cli_print_str(cs, DEFAULT_CIPHER_LIST, "cipher-list", 0);
|
|
|
+ }
|
|
|
|
|
|
cli_print_str(cs, turn_params.ec_curve_name, "ec-curve-name", 0);
|
|
|
{
|
|
|
- if (turn_params.dh_key_size == DH_CUSTOM)
|
|
|
+ if (turn_params.dh_key_size == DH_CUSTOM) {
|
|
|
cli_print_str(cs, turn_params.dh_file, "dh-file", 0);
|
|
|
- else {
|
|
|
+ } else {
|
|
|
unsigned int dh_key_length = 1066;
|
|
|
- if (turn_params.dh_key_size == DH_566)
|
|
|
+ if (turn_params.dh_key_size == DH_566) {
|
|
|
dh_key_length = 566;
|
|
|
- else if (turn_params.dh_key_size == DH_2066)
|
|
|
+ } else if (turn_params.dh_key_size == DH_2066) {
|
|
|
dh_key_length = 2066;
|
|
|
+ }
|
|
|
cli_print_uint(cs, (unsigned long)dh_key_length, "DH-key-length", 0);
|
|
|
}
|
|
|
}
|
|
@@ -684,8 +722,9 @@ static void cli_print_configuration(struct cli_session *cs) {
|
|
|
|
|
|
cli_print_str_array(cs, turn_params.listener.addrs, turn_params.listener.addrs_number, "Listener addr", 0);
|
|
|
|
|
|
- if (turn_params.listener_ifname[0])
|
|
|
+ if (turn_params.listener_ifname[0]) {
|
|
|
cli_print_str(cs, turn_params.listener_ifname, "listener-ifname", 0);
|
|
|
+ }
|
|
|
|
|
|
cli_print_flag(cs, turn_params.no_udp, "no-udp", 0);
|
|
|
cli_print_flag(cs, turn_params.no_tcp, "no-tcp", 0);
|
|
@@ -713,8 +752,9 @@ static void cli_print_configuration(struct cli_session *cs) {
|
|
|
|
|
|
cli_print_str_array(cs, turn_params.relay_addrs, turn_params.relays_number, "Relay addr", 0);
|
|
|
|
|
|
- if (turn_params.relay_ifname[0])
|
|
|
+ if (turn_params.relay_ifname[0]) {
|
|
|
cli_print_str(cs, turn_params.relay_ifname, "relay-ifname", 0);
|
|
|
+ }
|
|
|
|
|
|
cli_print_flag(cs, turn_params.server_relay, "server-relay", 0);
|
|
|
|
|
@@ -752,30 +792,36 @@ static void cli_print_configuration(struct cli_session *cs) {
|
|
|
}
|
|
|
|
|
|
#if !defined(TURN_NO_HIREDIS)
|
|
|
- if (turn_params.use_redis_statsdb && turn_params.redis_statsdb.connection_string[0])
|
|
|
+ if (turn_params.use_redis_statsdb && turn_params.redis_statsdb.connection_string[0]) {
|
|
|
cli_print_str(cs, turn_params.redis_statsdb.connection_string, "Redis Statistics DB", 0);
|
|
|
+ }
|
|
|
#endif
|
|
|
|
|
|
myprintf(cs, "\n");
|
|
|
|
|
|
{
|
|
|
char *rn = get_realm(NULL)->options.name;
|
|
|
- if (rn[0])
|
|
|
+ if (rn[0]) {
|
|
|
cli_print_str(cs, rn, "Default realm", 0);
|
|
|
+ }
|
|
|
}
|
|
|
- if (cs->realm[0])
|
|
|
+ if (cs->realm[0]) {
|
|
|
cli_print_str(cs, cs->realm, "CLI session realm", 0);
|
|
|
- else
|
|
|
+ } else {
|
|
|
cli_print_str(cs, get_realm(NULL)->options.name, "CLI session realm", 0);
|
|
|
- if (cs->origin[0])
|
|
|
+ }
|
|
|
+ if (cs->origin[0]) {
|
|
|
cli_print_str(cs, cs->origin, "CLI session origin", 0);
|
|
|
- if (turn_params.ct == TURN_CREDENTIALS_LONG_TERM)
|
|
|
+ }
|
|
|
+ if (turn_params.ct == TURN_CREDENTIALS_LONG_TERM) {
|
|
|
cli_print_flag(cs, 1, "Long-term authorization mechanism", 0);
|
|
|
- else
|
|
|
+ } else {
|
|
|
cli_print_flag(cs, 1, "Anonymous credentials", 0);
|
|
|
+ }
|
|
|
cli_print_flag(cs, turn_params.use_auth_secret_with_timestamp, "TURN REST API support", 0);
|
|
|
- if (turn_params.use_auth_secret_with_timestamp && turn_params.rest_api_separator)
|
|
|
+ if (turn_params.use_auth_secret_with_timestamp && turn_params.rest_api_separator) {
|
|
|
cli_print_uint(cs, turn_params.rest_api_separator, "TURN REST API separator ASCII number", 0);
|
|
|
+ }
|
|
|
|
|
|
myprintf(cs, "\n");
|
|
|
|
|
@@ -885,8 +931,9 @@ static int run_cli_input(struct cli_session *cs, const char *buf0, unsigned int
|
|
|
|
|
|
char *cmd = buf;
|
|
|
|
|
|
- while ((cmd[0] == ' ') || (cmd[0] == '\t'))
|
|
|
+ while ((cmd[0] == ' ') || (cmd[0] == '\t')) {
|
|
|
++cmd;
|
|
|
+ }
|
|
|
|
|
|
size_t sl = strlen(cmd);
|
|
|
|
|
@@ -962,8 +1009,9 @@ static int run_cli_input(struct cli_session *cs, const char *buf0, unsigned int
|
|
|
type_cli_cursor(cs);
|
|
|
} else if (strstr(cmd, "psd") == cmd) {
|
|
|
cmd += 3;
|
|
|
- while (cmd[0] == ' ')
|
|
|
+ while (cmd[0] == ' ') {
|
|
|
++cmd;
|
|
|
+ }
|
|
|
if (!(cmd[0])) {
|
|
|
const char *str = "You have to provide file name for ps dump\n";
|
|
|
myprintf(cs, "%s\n", str);
|
|
@@ -1032,8 +1080,9 @@ static void cli_socket_input_handler_bev(struct bufferevent *bev, void *arg) {
|
|
|
|
|
|
struct cli_session *cs = (struct cli_session *)arg;
|
|
|
|
|
|
- if (!(cs->ts))
|
|
|
+ if (!(cs->ts)) {
|
|
|
return;
|
|
|
+ }
|
|
|
|
|
|
stun_buffer buf;
|
|
|
|
|
@@ -1535,10 +1584,10 @@ static char *current_realm(void) {
|
|
|
|
|
|
static char *current_eff_realm(void) {
|
|
|
char *r = current_realm();
|
|
|
- if (r && r[0])
|
|
|
+ if (r && r[0]) {
|
|
|
return r;
|
|
|
- else if (current_socket && current_socket->special_session &&
|
|
|
- ((struct admin_session *)current_socket->special_session)->as_ok) {
|
|
|
+ } else if (current_socket && current_socket->special_session &&
|
|
|
+ ((struct admin_session *)current_socket->special_session)->as_ok) {
|
|
|
return ((struct admin_session *)current_socket->special_session)->as_eff_realm;
|
|
|
} else {
|
|
|
static char bad_eff_realm[1025] = "_ERROR:UNKNOWN_REALM__";
|
|
@@ -1613,8 +1662,9 @@ static AS_FORM get_form(const char *path) {
|
|
|
if (path) {
|
|
|
size_t i = 0;
|
|
|
while (form_names[i].name) {
|
|
|
- if (!strcmp(form_names[i].name, path))
|
|
|
+ if (!strcmp(form_names[i].name, path)) {
|
|
|
return form_names[i].form;
|
|
|
+ }
|
|
|
++i;
|
|
|
}
|
|
|
}
|
|
@@ -1765,8 +1815,9 @@ static void sbprintf(struct str_buffer *sb, const char *format, ...) {
|
|
|
|
|
|
static void https_print_flag(struct str_buffer *sb, int flag, const char *name, const char *param_name) {
|
|
|
if (sb && name) {
|
|
|
- if (!is_superuser())
|
|
|
+ if (!is_superuser()) {
|
|
|
param_name = 0;
|
|
|
+ }
|
|
|
if (!param_name) {
|
|
|
sbprintf(sb, "<tr><td>%s</td><td>%s</td></tr>\r\n", name, get_flag(flag));
|
|
|
} else {
|
|
@@ -1778,8 +1829,9 @@ static void https_print_flag(struct str_buffer *sb, int flag, const char *name,
|
|
|
|
|
|
static void https_print_uint(struct str_buffer *sb, unsigned long value, const char *name, const char *param_name) {
|
|
|
if (sb && name) {
|
|
|
- if (!is_superuser())
|
|
|
+ if (!is_superuser()) {
|
|
|
param_name = 0;
|
|
|
+ }
|
|
|
if (!param_name) {
|
|
|
if (value) {
|
|
|
sbprintf(sb, "<tr><td>%s</td><td>%lu</td></tr>\r\n", name, value);
|
|
@@ -1804,8 +1856,9 @@ static void https_print_uint(struct str_buffer *sb, unsigned long value, const c
|
|
|
|
|
|
static void https_print_str(struct str_buffer *sb, const char *value, const char *name, const char *param_name) {
|
|
|
if (sb && name && value) {
|
|
|
- if (!is_superuser())
|
|
|
+ if (!is_superuser()) {
|
|
|
param_name = 0;
|
|
|
+ }
|
|
|
if (!param_name) {
|
|
|
sbprintf(sb, "<tr><td>%s</td><td>%s</td></tr>\r\n", name, value);
|
|
|
} else {
|
|
@@ -1831,10 +1884,11 @@ static void https_print_str_array(struct str_buffer *sb, char **value, size_t sz
|
|
|
static void https_print_addr(struct str_buffer *sb, ioa_addr *value, int use_port, const char *name) {
|
|
|
if (sb && name && value) {
|
|
|
char s[256];
|
|
|
- if (!use_port)
|
|
|
+ if (!use_port) {
|
|
|
addr_to_string_no_port(value, (uint8_t *)s);
|
|
|
- else
|
|
|
+ } else {
|
|
|
addr_to_string(value, (uint8_t *)s);
|
|
|
+ }
|
|
|
sbprintf(sb, "<tr><td> %s</td><td> %s</td></tr>\r\n", name, s);
|
|
|
}
|
|
|
}
|
|
@@ -1845,10 +1899,11 @@ static size_t https_print_addr_list(struct str_buffer *sb, turn_server_addrs_lis
|
|
|
char s[256];
|
|
|
size_t i;
|
|
|
for (i = 0; i < value->size; i++) {
|
|
|
- if (!use_port)
|
|
|
+ if (!use_port) {
|
|
|
addr_to_string_no_port(&(value->addrs[i]), (uint8_t *)s);
|
|
|
- else
|
|
|
+ } else {
|
|
|
addr_to_string(&(value->addrs[i]), (uint8_t *)s);
|
|
|
+ }
|
|
|
sbprintf(sb, "</tr><td> %s</td><td> %s</td></tr>\r\n", name, s);
|
|
|
}
|
|
|
return i;
|
|
@@ -1864,8 +1919,9 @@ static const char *change_ip_addr_html(int dynamic, const char *kind, const char
|
|
|
buffer[0] = 0;
|
|
|
if (dynamic && kind && ip) {
|
|
|
|
|
|
- if (!realm)
|
|
|
+ if (!realm) {
|
|
|
realm = "";
|
|
|
+ }
|
|
|
|
|
|
if (current_realm()[0] && strcmp(current_realm(), realm)) {
|
|
|
// delete forbidden
|
|
@@ -1934,8 +1990,9 @@ static void toggle_param(const char *pn) {
|
|
|
|
|
|
static void update_param(const char *pn, const char *value) {
|
|
|
if (pn) {
|
|
|
- if (!value)
|
|
|
+ if (!value) {
|
|
|
value = "0";
|
|
|
+ }
|
|
|
if (is_superuser()) {
|
|
|
if (strstr(pn, "total-quota") == pn) {
|
|
|
turn_params.total_quota = atoi(value);
|
|
@@ -1949,8 +2006,9 @@ static void update_param(const char *pn, const char *value) {
|
|
|
}
|
|
|
{
|
|
|
realm_params_t *rp = get_realm(current_eff_realm());
|
|
|
- if (!rp)
|
|
|
+ if (!rp) {
|
|
|
rp = get_realm(NULL);
|
|
|
+ }
|
|
|
|
|
|
const turn_dbdriver_t *dbd = get_dbdriver();
|
|
|
if (dbd && dbd->set_realm_option_one) {
|
|
@@ -2020,21 +2078,23 @@ static void write_pc_page(ioa_socket_handle s) {
|
|
|
|
|
|
https_print_empty_row(sb, 2);
|
|
|
|
|
|
- if (turn_params.cipher_list[0])
|
|
|
+ if (turn_params.cipher_list[0]) {
|
|
|
https_print_str(sb, turn_params.cipher_list, "cipher-list", 0);
|
|
|
- else
|
|
|
+ } else {
|
|
|
https_print_str(sb, DEFAULT_CIPHER_LIST, "cipher-list", 0);
|
|
|
+ }
|
|
|
|
|
|
https_print_str(sb, turn_params.ec_curve_name, "ec-curve-name", 0);
|
|
|
{
|
|
|
- if (turn_params.dh_key_size == DH_CUSTOM)
|
|
|
+ if (turn_params.dh_key_size == DH_CUSTOM) {
|
|
|
https_print_str(sb, turn_params.dh_file, "dh-file", 0);
|
|
|
- else {
|
|
|
+ } else {
|
|
|
unsigned int dh_key_length = 1066;
|
|
|
- if (turn_params.dh_key_size == DH_566)
|
|
|
+ if (turn_params.dh_key_size == DH_566) {
|
|
|
dh_key_length = 566;
|
|
|
- else if (turn_params.dh_key_size == DH_2066)
|
|
|
+ } else if (turn_params.dh_key_size == DH_2066) {
|
|
|
dh_key_length = 2066;
|
|
|
+ }
|
|
|
https_print_uint(sb, (unsigned long)dh_key_length, "DH-key-length", 0);
|
|
|
}
|
|
|
}
|
|
@@ -2047,8 +2107,9 @@ static void write_pc_page(ioa_socket_handle s) {
|
|
|
|
|
|
https_print_str_array(sb, turn_params.listener.addrs, turn_params.listener.addrs_number, "Listener addr");
|
|
|
|
|
|
- if (turn_params.listener_ifname[0])
|
|
|
+ if (turn_params.listener_ifname[0]) {
|
|
|
https_print_str(sb, turn_params.listener_ifname, "listener-ifname", 0);
|
|
|
+ }
|
|
|
|
|
|
https_print_flag(sb, turn_params.no_udp, "no-udp", 0);
|
|
|
https_print_flag(sb, turn_params.no_tcp, "no-tcp", 0);
|
|
@@ -2080,8 +2141,9 @@ static void write_pc_page(ioa_socket_handle s) {
|
|
|
|
|
|
https_print_str_array(sb, turn_params.relay_addrs, turn_params.relays_number, "Relay addr");
|
|
|
|
|
|
- if (turn_params.relay_ifname[0])
|
|
|
+ if (turn_params.relay_ifname[0]) {
|
|
|
https_print_str(sb, turn_params.relay_ifname, "relay-ifname", 0);
|
|
|
+ }
|
|
|
|
|
|
https_print_flag(sb, turn_params.server_relay, "server-relay", 0);
|
|
|
|
|
@@ -2116,10 +2178,11 @@ static void write_pc_page(ioa_socket_handle s) {
|
|
|
|
|
|
https_print_empty_row(sb, 2);
|
|
|
|
|
|
- if (turn_params.ct == TURN_CREDENTIALS_LONG_TERM)
|
|
|
+ if (turn_params.ct == TURN_CREDENTIALS_LONG_TERM) {
|
|
|
https_print_flag(sb, 1, "Long-term authorization mechanism", 0);
|
|
|
- else
|
|
|
+ } else {
|
|
|
https_print_flag(sb, 1, "Anonymous credentials", 0);
|
|
|
+ }
|
|
|
https_print_flag(sb, turn_params.use_auth_secret_with_timestamp, "TURN REST API support", 0);
|
|
|
if (turn_params.use_auth_secret_with_timestamp) {
|
|
|
|
|
@@ -2134,13 +2197,15 @@ static void write_pc_page(ioa_socket_handle s) {
|
|
|
|
|
|
if (is_superuser()) {
|
|
|
char *rn = get_realm(NULL)->options.name;
|
|
|
- if (rn[0])
|
|
|
+ if (rn[0]) {
|
|
|
https_print_str(sb, rn, "Default realm", 0);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
realm_params_t *rp = get_realm(current_eff_realm());
|
|
|
- if (!rp)
|
|
|
+ if (!rp) {
|
|
|
rp = get_realm(NULL);
|
|
|
+ }
|
|
|
|
|
|
https_print_str(sb, rp->options.name, "Admin session (current) realm", 0);
|
|
|
|
|
@@ -2205,8 +2270,9 @@ static int https_print_session(ur_map_key_type key, ur_map_value_type value, voi
|
|
|
struct str_buffer *sb = csarg->sb;
|
|
|
struct turn_session_info *tsi = (struct turn_session_info *)value;
|
|
|
|
|
|
- if (current_eff_realm()[0] && strcmp(current_eff_realm(), tsi->realm))
|
|
|
+ if (current_eff_realm()[0] && strcmp(current_eff_realm(), tsi->realm)) {
|
|
|
return 0;
|
|
|
+ }
|
|
|
|
|
|
if (csarg->user_pattern[0]) {
|
|
|
if (!strstr((char *)tsi->username, csarg->user_pattern)) {
|
|
@@ -2222,17 +2288,21 @@ static int https_print_session(ur_map_key_type key, ur_map_value_type value, voi
|
|
|
const char *pn = csarg->client_protocol;
|
|
|
if (pn[0]) {
|
|
|
if (!strcmp(pn, "TLS") || !strcmp(pn, "tls") || !strcmp(pn, "Tls")) {
|
|
|
- if ((tsi->client_protocol != TLS_SOCKET) && (tsi->client_protocol != TLS_SCTP_SOCKET))
|
|
|
+ if ((tsi->client_protocol != TLS_SOCKET) && (tsi->client_protocol != TLS_SCTP_SOCKET)) {
|
|
|
return 0;
|
|
|
+ }
|
|
|
} else if (!strcmp(pn, "DTLS") || !strcmp(pn, "dtls") || !strcmp(pn, "Dtls")) {
|
|
|
- if (tsi->client_protocol != DTLS_SOCKET)
|
|
|
+ if (tsi->client_protocol != DTLS_SOCKET) {
|
|
|
return 0;
|
|
|
+ }
|
|
|
} else if (!strcmp(pn, "TCP") || !strcmp(pn, "tcp") || !strcmp(pn, "Tcp")) {
|
|
|
- if ((tsi->client_protocol != TCP_SOCKET) && (tsi->client_protocol != SCTP_SOCKET))
|
|
|
+ if ((tsi->client_protocol != TCP_SOCKET) && (tsi->client_protocol != SCTP_SOCKET)) {
|
|
|
return 0;
|
|
|
+ }
|
|
|
} else if (!strcmp(pn, "UDP") || !strcmp(pn, "udp") || !strcmp(pn, "Udp")) {
|
|
|
- if (tsi->client_protocol != UDP_SOCKET)
|
|
|
+ if (tsi->client_protocol != UDP_SOCKET) {
|
|
|
return 0;
|
|
|
+ }
|
|
|
} else {
|
|
|
return 0;
|
|
|
}
|
|
@@ -2273,14 +2343,18 @@ static int https_print_session(ur_map_key_type key, ur_map_value_type value, voi
|
|
|
str_buffer_append(sb, socket_type_name(tsi->peer_protocol));
|
|
|
str_buffer_append(sb, "</td><td>");
|
|
|
{
|
|
|
- if (!tsi->local_addr_data.saddr[0])
|
|
|
+ if (!tsi->local_addr_data.saddr[0]) {
|
|
|
addr_to_string(&(tsi->local_addr_data.addr), (uint8_t *)tsi->local_addr_data.saddr);
|
|
|
- if (!tsi->remote_addr_data.saddr[0])
|
|
|
+ }
|
|
|
+ if (!tsi->remote_addr_data.saddr[0]) {
|
|
|
addr_to_string(&(tsi->remote_addr_data.addr), (uint8_t *)tsi->remote_addr_data.saddr);
|
|
|
- if (!tsi->relay_addr_data_ipv4.saddr[0])
|
|
|
+ }
|
|
|
+ if (!tsi->relay_addr_data_ipv4.saddr[0]) {
|
|
|
addr_to_string(&(tsi->relay_addr_data_ipv4.addr), (uint8_t *)tsi->relay_addr_data_ipv4.saddr);
|
|
|
- if (!tsi->relay_addr_data_ipv6.saddr[0])
|
|
|
+ }
|
|
|
+ if (!tsi->relay_addr_data_ipv6.saddr[0]) {
|
|
|
addr_to_string(&(tsi->relay_addr_data_ipv6.addr), (uint8_t *)tsi->relay_addr_data_ipv6.saddr);
|
|
|
+ }
|
|
|
str_buffer_append(sb, tsi->remote_addr_data.saddr);
|
|
|
str_buffer_append(sb, "</td><td>");
|
|
|
str_buffer_append(sb, tsi->local_addr_data.saddr);
|
|
@@ -2319,16 +2393,18 @@ static int https_print_session(ur_map_key_type key, ur_map_value_type value, voi
|
|
|
if (tsi->main_peers_size) {
|
|
|
size_t i;
|
|
|
for (i = 0; i < tsi->main_peers_size; ++i) {
|
|
|
- if (!(tsi->main_peers_data[i].saddr[0]))
|
|
|
+ if (!(tsi->main_peers_data[i].saddr[0])) {
|
|
|
addr_to_string(&(tsi->main_peers_data[i].addr), (uint8_t *)tsi->main_peers_data[i].saddr);
|
|
|
+ }
|
|
|
str_buffer_append(sb, " ");
|
|
|
str_buffer_append(sb, tsi->main_peers_data[i].saddr);
|
|
|
str_buffer_append(sb, " ");
|
|
|
}
|
|
|
if (tsi->extra_peers_size && tsi->extra_peers_data) {
|
|
|
for (i = 0; i < tsi->extra_peers_size; ++i) {
|
|
|
- if (!(tsi->extra_peers_data[i].saddr[0]))
|
|
|
+ if (!(tsi->extra_peers_data[i].saddr[0])) {
|
|
|
addr_to_string(&(tsi->extra_peers_data[i].addr), (uint8_t *)tsi->extra_peers_data[i].saddr);
|
|
|
+ }
|
|
|
str_buffer_append(sb, " ");
|
|
|
str_buffer_append(sb, tsi->extra_peers_data[i].saddr);
|
|
|
str_buffer_append(sb, " ");
|
|
@@ -2994,8 +3070,9 @@ static void write_https_oauth_page(ioa_socket_handle s, const char *add_kid, con
|
|
|
str_buffer_append(sb, "<table><tr><td>");
|
|
|
|
|
|
{
|
|
|
- if (!add_kid)
|
|
|
+ if (!add_kid) {
|
|
|
add_kid = "";
|
|
|
+ }
|
|
|
|
|
|
str_buffer_append(sb, " <br>KID (required): <input required type=\"text\" name=\"");
|
|
|
str_buffer_append(sb, HR_ADD_OAUTH_KID);
|
|
@@ -3007,8 +3084,9 @@ static void write_https_oauth_page(ioa_socket_handle s, const char *add_kid, con
|
|
|
str_buffer_append(sb, "</td><td>");
|
|
|
|
|
|
{
|
|
|
- if (!add_ts)
|
|
|
+ if (!add_ts) {
|
|
|
add_ts = "";
|
|
|
+ }
|
|
|
|
|
|
str_buffer_append(sb, " <br>Timestamp, secs (optional): <input type=\"number\" min=\"0\" name=\"");
|
|
|
str_buffer_append(sb, HR_ADD_OAUTH_TS);
|
|
@@ -3020,8 +3098,9 @@ static void write_https_oauth_page(ioa_socket_handle s, const char *add_kid, con
|
|
|
str_buffer_append(sb, "</td><td>");
|
|
|
|
|
|
{
|
|
|
- if (!add_lt)
|
|
|
+ if (!add_lt) {
|
|
|
add_lt = "";
|
|
|
+ }
|
|
|
|
|
|
str_buffer_append(sb, " <br>Lifetime, secs (optional): <input type=\"number\" min=\"0\" name=\"");
|
|
|
str_buffer_append(sb, HR_ADD_OAUTH_LT);
|
|
@@ -3035,8 +3114,9 @@ static void write_https_oauth_page(ioa_socket_handle s, const char *add_kid, con
|
|
|
str_buffer_append(sb, "<tr><td colspan=\"1\">");
|
|
|
|
|
|
{
|
|
|
- if (!add_ikm)
|
|
|
+ if (!add_ikm) {
|
|
|
add_ikm = "";
|
|
|
+ }
|
|
|
|
|
|
str_buffer_append(sb, " <br>Base64-encoded input keying material (required):<br><textarea wrap=\"soft\" "
|
|
|
"cols=40 rows=4 name=\"");
|
|
@@ -3050,8 +3130,9 @@ static void write_https_oauth_page(ioa_socket_handle s, const char *add_kid, con
|
|
|
str_buffer_append(sb, "</td><td>");
|
|
|
|
|
|
{
|
|
|
- if (!add_realm)
|
|
|
+ if (!add_realm) {
|
|
|
add_realm = "";
|
|
|
+ }
|
|
|
|
|
|
str_buffer_append(sb, " <br>Realm (optional): <input type=\"text\" name=\"");
|
|
|
str_buffer_append(sb, HR_ADD_OAUTH_REALM);
|
|
@@ -3065,8 +3146,9 @@ static void write_https_oauth_page(ioa_socket_handle s, const char *add_kid, con
|
|
|
{
|
|
|
str_buffer_append(sb, "<br>Token encryption algorithm (required):<br>\r\n");
|
|
|
|
|
|
- if (!add_tea || !add_tea[0])
|
|
|
+ if (!add_tea || !add_tea[0]) {
|
|
|
add_tea = "A256GCM";
|
|
|
+ }
|
|
|
|
|
|
str_buffer_append(sb, "<input type=\"radio\" name=\"");
|
|
|
str_buffer_append(sb, HR_ADD_OAUTH_TEA);
|
|
@@ -3276,8 +3358,9 @@ static void handle_https(ioa_socket_handle s, ioa_network_buffer_handle nbh) {
|
|
|
case AS_FORM_PC: {
|
|
|
if (is_as_ok(s)) {
|
|
|
const char *realm0 = get_http_header_value(hr, HR_REALM, current_realm());
|
|
|
- if (!is_superuser())
|
|
|
+ if (!is_superuser()) {
|
|
|
realm0 = current_realm();
|
|
|
+ }
|
|
|
strncpy(current_eff_realm(), realm0, STUN_MAX_REALM_SIZE);
|
|
|
write_pc_page(s);
|
|
|
} else {
|
|
@@ -3288,8 +3371,9 @@ static void handle_https(ioa_socket_handle s, ioa_network_buffer_handle nbh) {
|
|
|
case AS_FORM_PS: {
|
|
|
if (is_as_ok(s)) {
|
|
|
const char *realm0 = get_http_header_value(hr, HR_REALM, current_realm());
|
|
|
- if (!is_superuser())
|
|
|
+ if (!is_superuser()) {
|
|
|
realm0 = current_realm();
|
|
|
+ }
|
|
|
strncpy(current_eff_realm(), realm0, STUN_MAX_REALM_SIZE);
|
|
|
|
|
|
const char *client_protocol = get_http_header_value(hr, HR_CLIENT_PROTOCOL, "");
|
|
@@ -3307,13 +3391,15 @@ static void handle_https(ioa_socket_handle s, ioa_network_buffer_handle nbh) {
|
|
|
const char *s_max_sessions = get_http_header_value(hr, HR_MAX_SESSIONS, NULL);
|
|
|
if (s_max_sessions) {
|
|
|
max_sessions = strtoul(s_max_sessions, NULL, 10);
|
|
|
- if (!max_sessions)
|
|
|
+ if (!max_sessions) {
|
|
|
max_sessions = current_max_output_sessions();
|
|
|
+ }
|
|
|
set_current_max_output_sessions(max_sessions);
|
|
|
}
|
|
|
|
|
|
- if (!max_sessions)
|
|
|
+ if (!max_sessions) {
|
|
|
max_sessions = DEFAULT_CLI_MAX_OUTPUT_SESSIONS;
|
|
|
+ }
|
|
|
|
|
|
write_ps_page(s, client_protocol, user_pattern, max_sessions, csid);
|
|
|
} else {
|
|
@@ -3325,8 +3411,9 @@ static void handle_https(ioa_socket_handle s, ioa_network_buffer_handle nbh) {
|
|
|
if (is_as_ok(s)) {
|
|
|
{
|
|
|
const char *realm0 = get_http_header_value(hr, HR_REALM, current_realm());
|
|
|
- if (!is_superuser())
|
|
|
+ if (!is_superuser()) {
|
|
|
realm0 = current_realm();
|
|
|
+ }
|
|
|
strncpy(current_eff_realm(), realm0, STUN_MAX_REALM_SIZE);
|
|
|
}
|
|
|
|
|
@@ -3425,8 +3512,9 @@ static void handle_https(ioa_socket_handle s, ioa_network_buffer_handle nbh) {
|
|
|
if (is_as_ok(s)) {
|
|
|
{
|
|
|
const char *realm0 = get_http_header_value(hr, HR_REALM, current_realm());
|
|
|
- if (!is_superuser())
|
|
|
+ if (!is_superuser()) {
|
|
|
realm0 = current_realm();
|
|
|
+ }
|
|
|
strncpy(current_eff_realm(), realm0, STUN_MAX_REALM_SIZE);
|
|
|
}
|
|
|
|
|
@@ -3498,8 +3586,9 @@ static void handle_https(ioa_socket_handle s, ioa_network_buffer_handle nbh) {
|
|
|
if (is_as_ok(s)) {
|
|
|
{
|
|
|
const char *realm0 = get_http_header_value(hr, HR_REALM, current_realm());
|
|
|
- if (!is_superuser())
|
|
|
+ if (!is_superuser()) {
|
|
|
realm0 = current_realm();
|
|
|
+ }
|
|
|
strncpy(current_eff_realm(), realm0, STUN_MAX_REALM_SIZE);
|
|
|
}
|
|
|
|
|
@@ -3622,8 +3711,9 @@ static void handle_https(ioa_socket_handle s, ioa_network_buffer_handle nbh) {
|
|
|
key.timestamp = (uint64_t)strtoull(add_ts, NULL, 10);
|
|
|
}
|
|
|
|
|
|
- if (add_realm && add_realm[0])
|
|
|
+ if (add_realm && add_realm[0]) {
|
|
|
STRCPY(key.realm, add_realm);
|
|
|
+ }
|
|
|
|
|
|
STRCPY(key.ikm_key, add_ikm);
|
|
|
STRCPY(key.as_rs_alg, add_tea);
|
|
@@ -3682,8 +3772,9 @@ static void handle_https(ioa_socket_handle s, ioa_network_buffer_handle nbh) {
|
|
|
break;
|
|
|
default: {
|
|
|
const char *realm0 = get_http_header_value(hr, HR_REALM, current_realm());
|
|
|
- if (!is_superuser())
|
|
|
+ if (!is_superuser()) {
|
|
|
realm0 = current_realm();
|
|
|
+ }
|
|
|
strncpy(current_eff_realm(), realm0, STUN_MAX_REALM_SIZE);
|
|
|
write_https_home_page(s);
|
|
|
}
|