summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-08-30 08:56:07 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-08-30 15:04:16 +0200
commit49a9427a9e5445516f0c31b410f17e785e178f5d (patch)
tree592921d87f68eb8f2c1aa8dd0c63a4fa0a25845e
parent88467ee341dfde5f075eee5c12c3ad607fbaa8d9 (diff)
mgcp: Update the sender state, fix the test case to deal with that
-rw-r--r--openbsc/src/libmgcp/rtp_helper.c3
-rw-r--r--openbsc/tests/mgcp/mgcp_test.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/openbsc/src/libmgcp/rtp_helper.c b/openbsc/src/libmgcp/rtp_helper.c
index a07db35..aafbbe5 100644
--- a/openbsc/src/libmgcp/rtp_helper.c
+++ b/openbsc/src/libmgcp/rtp_helper.c
@@ -316,6 +316,9 @@ int rtp_compress(struct mgcp_rtp_compr_state *state, struct msgb *msg,
if (hdr->marker)
marker = 1;
+ state->generated_ssrc = ntohl(hdr->ssrc);
+ state->timestamp = ntohl(hdr->timestamp);
+ state->sequence = ntohs(hdr->sequence);
last_sequence = sequence;
count += 1;
}
diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c
index 4927027..32f2fd6 100644
--- a/openbsc/tests/mgcp/mgcp_test.c
+++ b/openbsc/tests/mgcp/mgcp_test.c
@@ -251,6 +251,7 @@ static void test_compress_one(const struct estate *edata, char *t)
INIT_LLIST_HEAD(&list);
+ state = edata->state;
if (rtp_decompress(&state, &list, out) != 0) {
fprintf(stderr, "Failed to decompress the code.\n");
abort();