Accept NUL character as alias for piggybacking dot to support broken gateways.
git-svn-id: http://voip.null.ro/svn/yate@2364 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
769675d06b
commit
0e5be1c7b9
|
@ -280,7 +280,7 @@ bool MGCPMessage::parse(MGCPEngine* engine, ObjList& dest,
|
||||||
error = "Invalid end-of-line";
|
error = "Invalid end-of-line";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!count || (count == 1 && *line == '.')) {
|
if (!count || (count == 1 && (*line == '.' || !*line))) {
|
||||||
if (!count)
|
if (!count)
|
||||||
empty++;
|
empty++;
|
||||||
else
|
else
|
||||||
|
@ -311,7 +311,7 @@ bool MGCPMessage::parse(MGCPEngine* engine, ObjList& dest,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Fallback with current index if found non empty line which doesn't start with '.'
|
// Fallback with current index if found non empty line which doesn't start with '.'
|
||||||
if (*line != '.')
|
if (*line && *line != '.')
|
||||||
crt = start;
|
crt = start;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -457,7 +457,7 @@ bool MGCPMessage::decodeParams(const unsigned char* buffer, unsigned int len,
|
||||||
// Terminate if the line is empty or is a message separator
|
// Terminate if the line is empty or is a message separator
|
||||||
if (!count)
|
if (!count)
|
||||||
break;
|
break;
|
||||||
if (count == 1 && *line == '.')
|
if (count == 1 && (*line == '.' || !*line))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
#ifdef PARSER_DEBUG
|
#ifdef PARSER_DEBUG
|
||||||
|
|
Loading…
Reference in New Issue