Update rtt_foreach to return bool

Follow up to 7f119911, because of f3b73f60
This commit is contained in:
Richard Russo 2024-05-28 13:18:56 -07:00
parent 2cbcdb1241
commit 4604638bb9
2 changed files with 4 additions and 4 deletions

View File

@ -3845,9 +3845,9 @@ size_t rtt_maps_count = 0;
size_t rtt_map_current = 0;
FILE *rtt_file;
int rtt_foreach(ur_map_key_type key, ur_map_value_type value) {
bool rtt_foreach(ur_map_key_type key, ur_map_value_type value) {
if (!value) {
return 0;
return false;
}
ur_map_value_type min = value;
for (size_t i = rtt_map_current + 1; i < rtt_maps_count; ++i) {
@ -3879,7 +3879,7 @@ int rtt_foreach(ur_map_key_type key, ur_map_value_type value) {
inet_ntop(AF_INET, &addr.sin_addr, saddr, sizeof(saddr));
fprintf(rtt_file, "%s/24,%ld\n", saddr, min);
}
return 0;
return false;
}
void admin_server_rtt_timer_handler(ioa_engine *engine, void *arg) {

View File

@ -116,7 +116,7 @@ int send_turn_session_info(struct turn_session_info *tsi);
void send_https_socket(ioa_socket_handle s);
// Signal change to add rtt metrics
int rtt_foreach(ur_map_key_type, ur_map_value_type);
bool rtt_foreach(ur_map_key_type, ur_map_value_type);
void admin_server_rtt_timer_handler(ioa_engine *, void *);
////////////////////////////////////////////