aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-09-12 11:30:41 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-06-17 09:37:32 +0200
commite7f8c708c08cbd5fa85088846ea8dd9c1c4f9533 (patch)
treecdda575dd8c978bbb3be812c7d03f25584e72a5a
parent7cf644fb5256d606696c6a42448a7d16e4f1a073 (diff)
mgcp: Remove the lost_no from the mgcp statistics
The RFC 3435 specifies a different formula for calculating the lost packages. It involves the number of received packages and the delta of the sequence number.
-rw-r--r--openbsc/include/openbsc/mgcp_internal.h1
-rw-r--r--openbsc/src/libmgcp/mgcp_network.c4
-rw-r--r--openbsc/src/libmgcp/mgcp_vty.c5
3 files changed, 2 insertions, 8 deletions
diff --git a/openbsc/include/openbsc/mgcp_internal.h b/openbsc/include/openbsc/mgcp_internal.h
index 05f5018c4..f2f6d3f7b 100644
--- a/openbsc/include/openbsc/mgcp_internal.h
+++ b/openbsc/include/openbsc/mgcp_internal.h
@@ -47,7 +47,6 @@ struct mgcp_rtp_state {
uint32_t orig_ssrc;
uint32_t ssrc;
uint16_t seq_no;
- int lost_no;
int seq_offset;
uint32_t last_timestamp;
int32_t timestamp_offset;
diff --git a/openbsc/src/libmgcp/mgcp_network.c b/openbsc/src/libmgcp/mgcp_network.c
index 77c1b64e4..167d78c3a 100644
--- a/openbsc/src/libmgcp/mgcp_network.c
+++ b/openbsc/src/libmgcp/mgcp_network.c
@@ -140,11 +140,7 @@ static void patch_and_count(struct mgcp_endpoint *endp, struct mgcp_rtp_state *s
rtp_hdr->timestamp = htonl(timestamp);
}
- /* seq changed, now compare if we have lost something */
- if (state->seq_no + 1u != seq)
- state->lost_no = abs(seq - (state->seq_no + 1));
state->seq_no = seq;
-
state->last_timestamp = timestamp;
if (payload < 0)
diff --git a/openbsc/src/libmgcp/mgcp_vty.c b/openbsc/src/libmgcp/mgcp_vty.c
index 3c4853fa8..eaea24462 100644
--- a/openbsc/src/libmgcp/mgcp_vty.c
+++ b/openbsc/src/libmgcp/mgcp_vty.c
@@ -125,13 +125,12 @@ static void dump_trunk(struct vty *vty, struct mgcp_trunk_config *cfg)
struct mgcp_endpoint *endp = &cfg->endpoints[i];
vty_out(vty,
" Endpoint 0x%.2x: CI: %d net: %u/%u bts: %u/%u on %s "
- "traffic received bts: %u/%u remote: %u/%u transcoder: %u/%u%s",
+ "traffic received bts: %u remote: %u transcoder: %u/%u%s",
i, endp->ci,
ntohs(endp->net_end.rtp_port), ntohs(endp->net_end.rtcp_port),
ntohs(endp->bts_end.rtp_port), ntohs(endp->bts_end.rtcp_port),
inet_ntoa(endp->bts_end.addr),
- endp->bts_end.packets, endp->bts_state.lost_no,
- endp->net_end.packets, endp->net_state.lost_no,
+ endp->bts_end.packets, endp->net_end.packets,
endp->trans_net.packets, endp->trans_bts.packets,
VTY_NEWLINE);
}