Skip to content

Commit 1f0ccd3

Browse files
czp182alandekok
authored andcommitted
fixed double-counting, when updating source and destination statistics
code was updating both stat[src_code] and stat[dst_code], once when updating source statistics and once again when updating destination statistics. (rlm_stats: per-IP stats double-count both src_code and dst_code 229)
1 parent b8155ad commit 1f0ccd3

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/modules/rlm_stats/rlm_stats.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ static unlang_action_t CC_HINT(nonnull) mod_stats_inc(unlang_result_t *p_result,
204204

205205
stats->last_packet = request->async->recv_time;
206206
stats->stats[src_code]++;
207-
stats->stats[dst_code]++;
208207

209208
/*
210209
* Update destination statistics
@@ -221,7 +220,6 @@ static unlang_action_t CC_HINT(nonnull) mod_stats_inc(unlang_result_t *p_result,
221220
}
222221

223222
stats->last_packet = request->async->recv_time;
224-
stats->stats[src_code]++;
225223
stats->stats[dst_code]++;
226224
pthread_mutex_unlock(&t->mutex);
227225

0 commit comments

Comments
 (0)