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>
3 files changed
tree: 23da3fc1fa55f4580b9f66583765d7e04583a272
  1. hlrsync/
  2. linux-kernel/
  3. openbsc/
  4. wireshark/
  5. README