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
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 @@
 			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 @@
 		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 {