Skip to content

Commit

Permalink
Update rtt_foreach to return bool
Browse files Browse the repository at this point in the history
Follow up to 7f11991, because of f3b73f6
  • Loading branch information
richard-signal committed May 28, 2024
1 parent 2cbcdb1 commit 4604638
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/apps/relay/turn_admin_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/apps/relay/turn_admin_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);

////////////////////////////////////////////
Expand Down

0 comments on commit 4604638

Please sign in to comment.