aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
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/include
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/include')
-rw-r--r--openbsc/include/openbsc/mgcp_internal.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/openbsc/include/openbsc/mgcp_internal.h b/openbsc/include/openbsc/mgcp_internal.h
index a9d51494b..6e0451ebf 100644
--- a/openbsc/include/openbsc/mgcp_internal.h
+++ b/openbsc/include/openbsc/mgcp_internal.h
@@ -131,9 +131,6 @@ struct mgcp_msg_ptr {
unsigned int length;
};
-int mgcp_analyze_header(struct mgcp_config *cfg, struct msgb *msg,
- struct mgcp_msg_ptr *ptr, int size,
- const char **transaction_id, struct mgcp_endpoint **endp);
int mgcp_send_dummy(struct mgcp_endpoint *endp);
int mgcp_bind_bts_rtp_port(struct mgcp_endpoint *endp, int rtp_port);
int mgcp_bind_net_rtp_port(struct mgcp_endpoint *endp, int rtp_port);