aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp/mgcp_network.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2013-12-05 12:20:05 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2013-12-10 11:13:22 +0100
commit5e9549e6a968fa0b5ef313a3e5a2622ceff42839 (patch)
treef444f1db9a69e95886d83aef13f7c9664de3708f /openbsc/src/libmgcp/mgcp_network.c
parentdb2d431697609d473de433b7028f81ce499a02c0 (diff)
mgcp/rtp: Change the log message shown when the SSRC changes
Show old and new SSRC. Move logging command upward to show the values immediately after the change has been detected and before any fixing attempt is made. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/libmgcp/mgcp_network.c')
-rw-r--r--openbsc/src/libmgcp/mgcp_network.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/openbsc/src/libmgcp/mgcp_network.c b/openbsc/src/libmgcp/mgcp_network.c
index 367cebd..d19b56e 100644
--- a/openbsc/src/libmgcp/mgcp_network.c
+++ b/openbsc/src/libmgcp/mgcp_network.c
@@ -249,6 +249,15 @@ void mgcp_patch_and_count(struct mgcp_endpoint *endp, struct mgcp_rtp_state *sta
endp->conn_mode);
} else if (state->in_stream.ssrc != rtp_hdr->ssrc) {
int32_t tsdelta = state->out_stream.last_tsdelta;
+
+ LOGP(DMGCP, LOGL_NOTICE,
+ "The SSRC changed on 0x%x: %u -> %u "
+ "from %s:%d in %d\n",
+ ENDPOINT_NUMBER(endp),
+ state->in_stream.ssrc, rtp_hdr->ssrc,
+ inet_ntoa(addr->sin_addr), ntohs(addr->sin_port),
+ endp->conn_mode);
+
if (tsdelta == 0) {
tsdelta = rtp_end->rate * rtp_end->frames_per_packet *
rtp_end->frame_duration_num /
@@ -265,13 +274,6 @@ void mgcp_patch_and_count(struct mgcp_endpoint *endp, struct mgcp_rtp_state *sta
state->timestamp_offset =
(state->out_stream.last_timestamp + tsdelta) - timestamp;
state->patch = rtp_end->force_constant_ssrc;
- LOGP(DMGCP, LOGL_NOTICE,
- "The SSRC changed on 0x%x SSRC: %u offset: %d tsdelta: %d "
- "from %s:%d in %d\n",
- ENDPOINT_NUMBER(endp), state->in_stream.ssrc,
- state->seq_offset, tsdelta,
- inet_ntoa(addr->sin_addr), ntohs(addr->sin_port),
- endp->conn_mode);
state->in_stream.last_tsdelta = 0;
} else {