aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-10-22 17:08:48 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-11-12 10:42:05 +0100
commited3a661d0b195fb0f7528022c90c84229828175a (patch)
treef1d6832cf69be7eff5509c1a27dd13207c9da617 /openbsc/src/libmgcp
parent0bf15a81878c9fce83d7cff8842c52b5839564b9 (diff)
mgcp: Align the variable naming with Appendix A of RFC 3550
Align the naming inside the mgcp_rtp_state with the naming inside the 'source' struct of the appendix. Make first_seq_no/base_seq a uint16_t. This is removing rules for alignments and reduces the struct from 40 bytes to 36.
Diffstat (limited to 'openbsc/src/libmgcp')
-rw-r--r--openbsc/src/libmgcp/mgcp_network.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/openbsc/src/libmgcp/mgcp_network.c b/openbsc/src/libmgcp/mgcp_network.c
index 408fea44b..bb531cc7c 100644
--- a/openbsc/src/libmgcp/mgcp_network.c
+++ b/openbsc/src/libmgcp/mgcp_network.c
@@ -120,14 +120,14 @@ static void patch_and_count(struct mgcp_endpoint *endp, struct mgcp_rtp_state *s
timestamp = ntohl(rtp_hdr->timestamp);
if (!state->initialized) {
- state->first_seq_no = seq;
- state->seq_no = seq - 1;
+ state->base_seq = seq;
+ state->max_seq = seq - 1;
state->ssrc = state->orig_ssrc = rtp_hdr->ssrc;
state->initialized = 1;
state->last_timestamp = timestamp;
} else if (state->ssrc != rtp_hdr->ssrc) {
state->ssrc = rtp_hdr->ssrc;
- state->seq_offset = (state->seq_no + 1) - seq;
+ state->seq_offset = (state->max_seq + 1) - seq;
state->timestamp_offset = state->last_timestamp - timestamp;
state->patch = endp->allow_patch;
LOGP(DMGCP, LOGL_NOTICE,
@@ -146,7 +146,7 @@ static void patch_and_count(struct mgcp_endpoint *endp, struct mgcp_rtp_state *s
rtp_hdr->timestamp = htonl(timestamp);
}
- state->seq_no = seq;
+ state->max_seq = seq;
state->last_timestamp = timestamp;
if (payload < 0)