diff --git a/src/apps/relay/ns_ioalib_engine_impl.c b/src/apps/relay/ns_ioalib_engine_impl.c index 232688e86..64340a1bd 100644 --- a/src/apps/relay/ns_ioalib_engine_impl.c +++ b/src/apps/relay/ns_ioalib_engine_impl.c @@ -3686,7 +3686,7 @@ void turn_report_allocation_set(void *a, turn_time_t lifetime, int refresh) { } #endif { - // Signal change to add address family label + // Signal change to add address family label if (!refresh) { prom_inc_allocation(get_ioa_socket_type(ss->client_socket), get_ioa_socket_address_family(ss->client_socket), ss->protocolgroup); diff --git a/src/apps/relay/prom_server.c b/src/apps/relay/prom_server.c index 2c3a26a12..0f33c390f 100644 --- a/src/apps/relay/prom_server.c +++ b/src/apps/relay/prom_server.c @@ -433,8 +433,19 @@ void prom_set_finished_traffic(const char *realm, const char *user, unsigned lon UNUSED_ARG(protocolgroup); } -void prom_inc_allocation(SOCKET_TYPE type) { UNUSED_ARG(type); } +void prom_inc_allocation(SOCKET_TYPE type, int addr_family, const char *protocolgroup) { + UNUSED_ARG(type); + UNUSED_ARG(addr_family); + UNUSED_ARG(protocolgroup); +} -void prom_dec_allocation(SOCKET_TYPE type) { UNUSED_ARG(type); } +void prom_dec_allocation(SOCKET_TYPE type, int addr_family, unsigned long duration, unsigned long sent_rate_kbps, + const char *protocolgroup) { + UNUSED_ARG(type); + UNUSED_ARG(addr_family); + UNUSED_ARG(duration); + UNUSED_ARG(sent_rate_kbps); + UNUSED_ARG(protocolgroup); +} #endif /* TURN_NO_PROMETHEUS */ diff --git a/src/apps/relay/prom_server.h b/src/apps/relay/prom_server.h index aa65380da..bffa09d0d 100644 --- a/src/apps/relay/prom_server.h +++ b/src/apps/relay/prom_server.h @@ -106,8 +106,9 @@ void prom_set_finished_traffic(const char *realm, const char *user, unsigned lon unsigned long sentp, unsigned long sentb, unsigned long without_pingp, bool peer, const char *protocolgroup); -void prom_inc_allocation(SOCKET_TYPE type); -void prom_dec_allocation(SOCKET_TYPE type); +void prom_inc_allocation(SOCKET_TYPE type, int addr_family, const char *protocolgroup); +void prom_dec_allocation(SOCKET_TYPE type, int addr_family, unsigned long duration, unsigned long sent_rate_kbps, + const char *protocolgroup); #endif /* TURN_NO_PROMETHEUS */ diff --git a/src/apps/relay/userdb.c b/src/apps/relay/userdb.c index 267008ad5..c636f6c49 100644 --- a/src/apps/relay/userdb.c +++ b/src/apps/relay/userdb.c @@ -779,8 +779,8 @@ int add_static_user_account(char *user) { return -1; } - // key argument (the usname variable) is deep-copied, so ownership isn't transfered, and we still need to free usname later.. - // value argument (the key variable) has ownership transfered into this function + // key argument (the usname variable) is deep-copied, so ownership isn't transfered, and we still need to free usname + // later.. value argument (the key variable) has ownership transfered into this function ur_string_map_put(turn_params.default_users_db.ram_db.static_accounts, (ur_string_map_key_type)usname, (ur_string_map_value_type)*key); ur_string_map_unlock(turn_params.default_users_db.ram_db.static_accounts); diff --git a/src/server/ns_turn_server.c b/src/server/ns_turn_server.c index 8cb85102b..c3b838898 100644 --- a/src/server/ns_turn_server.c +++ b/src/server/ns_turn_server.c @@ -3237,12 +3237,12 @@ static int handle_turn_create_permission(turn_turnserver *server, ts_ur_super_se if (!get_relay_socket(a, peer_addr.ss.sa_family)) { *err_code = 443; *reason = (const uint8_t *)"Peer Address Family Mismatch (4)"; - // Signal change to accept but ignore perrmissions to forbidden IPs - /* - } else if (!good_peer_addr(server, ss->realm_options.name, &peer_addr, ss->id)) { - *err_code = 403; - *reason = (const uint8_t *)"Forbidden IP"; - */ + // Signal change to accept but ignore perrmissions to forbidden IPs + /* + } else if (!good_peer_addr(server, ss->realm_options.name, &peer_addr, ss->id)) { + *err_code = 403; + *reason = (const uint8_t *)"Forbidden IP"; + */ } else { addr_found++; }