diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-09-21 12:18:37 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-09-21 12:18:37 +0200 |
commit | 71bc9e2ac815aa07480110361651fdb5dbaf9003 (patch) | |
tree | 8a77e4a717ae4a20071aaed59ef1fb9b9964aeef | |
parent | ortp: Export statistics for the bts or similar (diff) | |
download | libosmo-abis-71bc9e2ac815aa07480110361651fdb5dbaf9003.tar.xz libosmo-abis-71bc9e2ac815aa07480110361651fdb5dbaf9003.zip |
ortp: Guard the jitter stats with a version check
ortp 0.18 has introduced the jitter_stats but we only check for
0.21 an later. It is okay that at some point the jitter stats
will be reported. For previous versions it is 0.
-rw-r--r-- | src/trau/osmo_ortp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index 7edcd03..65ec269 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -553,7 +553,6 @@ void osmo_rtp_socket_stats(struct osmo_rtp_socket *rs, uint32_t *recv_lost, uint32_t *last_jitter) { const rtp_stats_t *stats; - const jitter_stats_t *jitter; *sent_packets = *sent_octets = *recv_packets = *recv_octets = 0; *recv_lost = *last_jitter = 0; @@ -568,7 +567,11 @@ void osmo_rtp_socket_stats(struct osmo_rtp_socket *rs, *recv_lost = stats->cum_packet_loss; } +#if HAVE_ORTP_021 + const jitter_stats_t *jitter; + jitter = rtp_session_get_jitter_stats(rs->sess); if (jitter) *last_jitter = jitter->jitter; +#endif } |