From b90363f0765bd7db3d53be145a882a577772b10e Mon Sep 17 00:00:00 2001 From: Sam Stenvall Date: Mon, 12 Aug 2024 13:48:55 +0300 Subject: [PATCH] More robust RTSP return code parsing Fixes #1164 --- src/satipc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/satipc.c b/src/satipc.c index d4e9295ab7..bf2beb2846 100644 --- a/src/satipc.c +++ b/src/satipc.c @@ -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 "