Skip to content

Commit

Permalink
More robust RTSP return code parsing
Browse files Browse the repository at this point in the history
Fixes #1164
  • Loading branch information
Jalle19 committed Aug 13, 2024
1 parent 607a186 commit cdf1749
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/satipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,10 @@ int satipc_reply(sockets *s) {
s->rlen = 0;
sip->keep_adapter_open = 0;

sep = strchr((char *)s->buf, ' ');
// Parse RTSP return code
sep = strstr((char *)s->buf, "RTSP/1.0");
if (sep)
rc = map_intd(sep + 1, NULL, 0);
rc = map_intd(sep + 9, NULL, 0);

LOGM("MSG process << server :\n%s", s->buf);
LOG("satipc_reply (adapter %d, state %d): receiving from handle %d, sock "
Expand Down

0 comments on commit cdf1749

Please sign in to comment.