aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/mgcp/mgcp_protocol.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-07-29 02:38:39 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-07-29 02:41:38 +0800
commit380b8711a2c3a7bc88ee3cc692c2f51e019b8859 (patch)
treed12a01f56b80b2e491a7a085187c245d05b612fd /openbsc/src/mgcp/mgcp_protocol.c
parent12b917d8390c4f8004beda1a465f93509323a058 (diff)
mgcp: Attempt to count missing RTP packets with a basic calculation
This code compares the UDP sequence numbers of two RTP messages and guesses if packets are missing. It is guessing in two ways: 1.) by default the sequence number is 0, so on the first value we ignore the jump... we might ignore a real issue in case of a wrap around which is easily possible as the sequence should be a random number. 2.) the UDP stream might have been reordered on the network and we would see the jump... In any case these two shortcomings are acceptable for the feature that is meant to provide some basic analysis..
Diffstat (limited to 'openbsc/src/mgcp/mgcp_protocol.c')
-rw-r--r--openbsc/src/mgcp/mgcp_protocol.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/openbsc/src/mgcp/mgcp_protocol.c b/openbsc/src/mgcp/mgcp_protocol.c
index d82bd68f9..8131277ac 100644
--- a/openbsc/src/mgcp/mgcp_protocol.c
+++ b/openbsc/src/mgcp/mgcp_protocol.c
@@ -764,4 +764,7 @@ void mgcp_free_endp(struct mgcp_endpoint *endp)
endp->in_bts = endp->in_remote = 0;
memset(&endp->remote, 0, sizeof(endp->remote));
memset(&endp->bts, 0, sizeof(endp->bts));
+
+ endp->net_seq_no = endp->bts_seq_no = 0;
+ endp->net_lost_no = endp->bts_lost_no = 0;
}