From 406f2dc36d7e7ee870833e589db966a3c7819dcb Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 12 Aug 2021 10:37:23 -0400 Subject: [PATCH] TT#101150 remove in_tos_tclass from struct stats Change-Id: I000f19f3eade23085952c86f6f730ab954f81b95 --- daemon/call.c | 2 +- daemon/cdr.c | 6 +++--- include/call.h | 1 + include/statistics.h | 2 -- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index fc8a0c3bf..7de4adcd5 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -617,7 +617,7 @@ void call_timer(void *ptr) { if (ke->stats.packets != atomic64_get(&ps->kernel_stats.packets)) atomic64_set(&ps->last_packet, rtpe_now.tv_sec); - ps->stats.in_tos_tclass = ke->stats.in_tos; + ps->in_tos_tclass = ke->stats.in_tos; #if (RE_HAS_MEASUREDELAY) /* XXX fix atomicity */ diff --git a/daemon/cdr.c b/daemon/cdr.c index 44d89bc4b..8dd5574dd 100644 --- a/daemon/cdr.c +++ b/daemon/cdr.c @@ -139,7 +139,7 @@ void cdr_update_entry(struct call* c) { cdrlinecnt, md->index, protocol, atomic64_get(&ps->last_packet), cdrlinecnt, md->index, protocol, - ps->stats.in_tos_tclass); + ps->in_tos_tclass); } else { #if (RE_HAS_MEASUREDELAY) g_string_append_printf(cdr, @@ -168,7 +168,7 @@ void cdr_update_entry(struct call* c) { cdrlinecnt, md->index, protocol, atomic64_get(&ps->last_packet), cdrlinecnt, md->index, protocol, - ps->stats.in_tos_tclass, + ps->in_tos_tclass, cdrlinecnt, md->index, protocol, (double) ps->stats.delay_min / 1000000, cdrlinecnt, md->index, protocol, (double) ps->stats.delay_avg / 1000000, cdrlinecnt, md->index, protocol, (double) ps->stats.delay_max / 1000000); @@ -197,7 +197,7 @@ void cdr_update_entry(struct call* c) { cdrlinecnt, md->index, protocol, atomic64_get(&ps->last_packet), cdrlinecnt, md->index, protocol, - ps->stats.in_tos_tclass); + ps->in_tos_tclass); #endif } } diff --git a/include/call.h b/include/call.h index eb3790fe9..aa081ba22 100644 --- a/include/call.h +++ b/include/call.h @@ -314,6 +314,7 @@ struct packet_stream { struct stats stats; struct stats kernel_stats; + unsigned char in_tos_tclass; atomic64 last_packet; GHashTable *rtp_stats; /* LOCK: call->master_lock */ struct rtp_stats *rtp_stats_cache; diff --git a/include/statistics.h b/include/statistics.h index 25fea176c..917cb4576 100644 --- a/include/statistics.h +++ b/include/statistics.h @@ -14,7 +14,6 @@ struct stats { uint64_t delay_min; uint64_t delay_avg; uint64_t delay_max; - uint8_t in_tos_tclass; /* XXX shouldn't be here - not stats */ atomic64 foreign_sessions; // unresponsible via redis notification atomic64 offers; atomic64 answers; @@ -82,7 +81,6 @@ struct rtp_stats { atomic64 bytes; atomic64 kernel_packets; atomic64 kernel_bytes; - atomic64 in_tos_tclass; }; struct codec_stats {