aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-05-21 17:04:35 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-05-21 17:04:35 +0200
commit9f3835b98879780f8b1bc5a253065693a13fe4e0 (patch)
tree82d5f1d53c8af5f9b965b3c413fb9ae6d00c5835 /openbsc
parent0a244b40c9394ba9d48b62575c3881734529b280 (diff)
mgcp: Initialize the tone to CHAR_MAX as this might not be a request
The RQNT message might not contain a 'S:' line with the actual tone to play. Instead of calling the callback with the 0 as tone just leave early. Example: X: 6B9519B88F0 R: D/[0-9#*](N), G/ft, fxr/t38
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/libmgcp/mgcp_protocol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/libmgcp/mgcp_protocol.c b/openbsc/src/libmgcp/mgcp_protocol.c
index dc5e0f992..d38bbf3c6 100644
--- a/openbsc/src/libmgcp/mgcp_protocol.c
+++ b/openbsc/src/libmgcp/mgcp_protocol.c
@@ -862,7 +862,7 @@ static struct msgb *handle_noti_req(struct mgcp_parse_data *p)
{
int res = 0;
char *line;
- char tone = 0;
+ char tone = CHAR_MAX;
if (p->found != 0)
return create_err_response(NULL, 400, "RQNT", p->trans);