aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/mgcp
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-01-27 12:31:36 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-03-16 10:24:18 +0100
commitae1997248ccb4fba1394267d3051082dfd85448a (patch)
tree23da3fc1fa55f4580b9f66583765d7e04583a272 /openbsc/tests/mgcp
parent6b36b90f7559076818ea589961acc243c341f689 (diff)
mgcp: implement a more tolerant parser based on strtok_r()
Instead of building complex manual byte-wise parsers, we simply use two strtok_r loops: one iterating over all the lines, the next one iterating over the invididual space-separated elements in the first line. The benefit is that we now accept \r, \n or \r\n, or any multiple of them as line ending. This works around incompliant MGCP implementations like that of Zynetix MSC. Addition: mgcp_analyze_header returns 0 when all out parameters have been set. Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
Diffstat (limited to 'openbsc/tests/mgcp')
-rw-r--r--openbsc/tests/mgcp/mgcp_test.ok2
1 files changed, 0 insertions, 2 deletions
diff --git a/openbsc/tests/mgcp/mgcp_test.ok b/openbsc/tests/mgcp/mgcp_test.ok
index 092c96913..45882a57f 100644
--- a/openbsc/tests/mgcp/mgcp_test.ok
+++ b/openbsc/tests/mgcp/mgcp_test.ok
@@ -2,8 +2,6 @@ Testing AUEP1
Testing AUEP2
Testing CRCX
Testing CRCX_ZYN
-CRCX_ZYN failed '400 2 FAIL
-'
Testing EMPTY
Testing SHORT1
Testing SHORT2