diff options
author | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2016-12-27 19:55:05 +0100 |
---|---|---|
committer | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2016-12-27 20:02:25 +0100 |
commit | f232ee00c7080a237a99ec65df6509f11a8f3c6b (patch) | |
tree | 951163f58d5c9e147e05918cfd2a693901578621 | |
parent | 548fd12e480e03835e02110c4fdfccfe7ef0a596 (diff) |
ortp: Log IP and port when logging RTP stats.ipse/jitter-stats-print
This allows us to match osmo-bts logs with logs of the other side (e.g. with
FreeSWITCH).
Change-Id: I5db92dab240779123c356af120adf3a3ef3838f1
-rw-r--r-- | src/trau/osmo_ortp.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index d505a7f..a7834c4 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -534,6 +534,8 @@ void osmo_rtp_socket_log_stats(struct osmo_rtp_socket *rs, const char *pfx) { char jitter_stats_str[1024] = ""; + const char *addr = NULL; + int port = 0; #if HAVE_ORTP_021 const jitter_stats_t *jitter; @@ -554,10 +556,15 @@ void osmo_rtp_socket_log_stats(struct osmo_rtp_socket *rs, return; } - LOGP(subsys, level, "%sRTP Tx(%"PRIu64" pkts, %"PRIu64" bytes) " + if (osmo_rtp_get_bound_addr(rs, &addr, &port) != 0) { + LOGP(subsys, level, "Failed to obtain RTP socket IP and port!"); + return; + } + + LOGP(subsys, level, "%sRTP IP %s port %d Tx(%"PRIu64" pkts, %"PRIu64" bytes) " "Rx(%"PRIu64" pkts, %"PRIu64" bytes, %"PRIu64" late, " "%"PRIu64" loss, %"PRIu64" qmax)%s\n", - pfx, stats->packet_sent, stats->sent, + pfx, addr, port, stats->packet_sent, stats->sent, stats->packet_recv, stats->hw_recv, stats->outoftime, stats->cum_packet_loss, stats->discarded, jitter_stats_str); |