aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-12-07 14:42:03 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-12-10 12:16:23 +0100
commitd267f4d685bccdf6eaa839044db2721b3c3c37c4 (patch)
tree26b52ab1b2c072b54197a261babb0b0ce38d3a30
parent0d904e004a763a104e40e707c5a3cde7bb0da3d7 (diff)
mgcp: Test the second CRCX as a CRCX and not as a re-transmission
The second CRCX would be mostly ignored and be handled by the retransmission layer of MGCP.
-rw-r--r--openbsc/tests/mgcp/mgcp_test.c15
-rw-r--r--openbsc/tests/mgcp/mgcp_test.ok1
2 files changed, 14 insertions, 2 deletions
diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c
index 74f5efee1..c4769710a 100644
--- a/openbsc/tests/mgcp/mgcp_test.c
+++ b/openbsc/tests/mgcp/mgcp_test.c
@@ -68,6 +68,16 @@
"m=audio 5904 RTP/AVP 97\r" \
"a=rtpmap:97 GSM-EFR/8000\r"
+#define CRCX_ZYN_RET "200 2 OK\r\n" \
+ "I: 2\n" \
+ "\n" \
+ "v=0\r\n" \
+ "o=- 2 23 IN IP4 0.0.0.0\r\n" \
+ "c=IN IP4 0.0.0.0\r\n" \
+ "t=0 0\r\n" \
+ "m=audio 0 RTP/AVP 126\r\n" \
+ "a=rtpmap:126 AMR/8000\r\n"
+
#define DLCX "DLCX 7 1@mgw MGCP 1.0\r\n" \
"C: 2\r\n"
@@ -90,11 +100,12 @@ struct mgcp_test {
const char *exp_resp;
};
-const struct mgcp_test tests[] = {
+static const struct mgcp_test tests[] = {
{ "AUEP1", AUEP1, AUEP1_RET },
{ "AUEP2", AUEP2, AUEP2_RET },
{ "CRCX", CRCX, CRCX_RET },
- { "CRCX_ZYN", CRCX_ZYN, CRCX_RET },
+ { "DLCX", DLCX, DLCX_RET },
+ { "CRCX_ZYN", CRCX_ZYN, CRCX_ZYN_RET },
{ "EMPTY", EMPTY, EMPTY_RET },
{ "SHORT1", SHORT, SHORT_RET },
{ "SHORT2", SHORT2, SHORT2_RET },
diff --git a/openbsc/tests/mgcp/mgcp_test.ok b/openbsc/tests/mgcp/mgcp_test.ok
index 1143a0441..5f300e463 100644
--- a/openbsc/tests/mgcp/mgcp_test.ok
+++ b/openbsc/tests/mgcp/mgcp_test.ok
@@ -1,6 +1,7 @@
Testing AUEP1
Testing AUEP2
Testing CRCX
+Testing DLCX
Testing CRCX_ZYN
Testing EMPTY
Testing SHORT1