TT#101150 properly name RTPE_STATS_INC/ADD

Change-Id: Iba35ea5a453d1a45b575ee98c4aeb2e0aef39473
pull/1373/head
Richard Fuchs 4 years ago
parent 406f2dc36d
commit 9c3e5e1fd7

@ -508,7 +508,7 @@ destroy:
else \
diff_ ## x = ke->stats.x - ks_val; \
atomic64_add(&ps->stats.x, diff_ ## x); \
RTPE_STATS_INC(x, diff_ ## x); \
RTPE_STATS_ADD(x, diff_ ## x); \
} while (0)
static void update_requests_per_second_stats(struct requests_ps *request, uint64_t new_val) {

@ -1798,7 +1798,7 @@ static void media_packet_rtp_in(struct packet_handler_ctx *phc)
phc->payload_type,
FMT_M(endpoint_print_buf(&phc->mp.fsin)));
atomic64_inc(&phc->mp.stream->stats.errors);
RTPE_STATS_INC(errors, 1);
RTPE_STATS_INC(errors);
}
else {
atomic64_inc(&rtp_s->packets);
@ -2292,8 +2292,8 @@ static int stream_packet(struct packet_handler_ctx *phc) {
}
atomic64_add(&phc->mp.stream->stats.bytes, phc->s.len);
atomic64_set(&phc->mp.stream->last_packet, rtpe_now.tv_sec);
RTPE_STATS_INC(packets, 1);
RTPE_STATS_INC(bytes, phc->s.len);
RTPE_STATS_INC(packets);
RTPE_STATS_ADD(bytes, phc->s.len);
int address_check = media_packet_address_check(phc);
if (address_check)
@ -2400,7 +2400,7 @@ static int stream_packet(struct packet_handler_ctx *phc) {
err_next:
ilog(LOG_DEBUG,"Error when sending message. Error: %s", strerror(errno));
atomic64_inc(&sh->sink->stats.errors);
RTPE_STATS_INC(errors, 1);
RTPE_STATS_INC(errors);
goto next;
next:
@ -2442,7 +2442,7 @@ out:
if (handler_ret < 0) {
atomic64_inc(&phc->mp.stream->stats.errors);
RTPE_STATS_INC(errors, 1);
RTPE_STATS_INC(errors);
}
rwlock_unlock_r(&phc->mp.call->master_lock);

@ -545,11 +545,12 @@ extern struct stats rtpe_statsps; /* per second stats, running timer */
extern struct stats rtpe_stats_cumulative; // total, cumulative
extern struct stats rtpe_stats; /* copied from statsps once a second */
#define RTPE_STATS_INC(field, num) \
#define RTPE_STATS_ADD(field, num) \
do { \
atomic64_add(&rtpe_statsps.field, num); \
atomic64_add(&rtpe_stats_cumulative.field, num); \
} while (0)
#define RTPE_STATS_INC(field) RTPE_STATS_ADD(field, 1)
int call_init(void);

Loading…
Cancel
Save