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
diff --git a/openbsc/src/libmgcp/mgcp_protocol.c b/openbsc/src/libmgcp/mgcp_protocol.c
index dc5e0f9..d38bbf3 100644
--- a/openbsc/src/libmgcp/mgcp_protocol.c
+++ b/openbsc/src/libmgcp/mgcp_protocol.c
@@ -862,7 +862,7 @@
{
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);