From acf46b1bba317fbe2024fc27e54774dc23b9c0de Mon Sep 17 00:00:00 2001 From: Jay Satiro Date: Mon, 28 Feb 2022 14:28:37 -0500 Subject: [PATCH] rtsp: don't let CSeq error override earlier errors - When done, if an error has already occurred then don't check the sequence numbers for mismatch. A sequence number may not have been received if an error occurred. Prior to this change a sequence mismatch error would override earlier errors. For example, a server that returns nothing would cause error CURLE_GOT_NOTHING in Curl_http_done which was then overridden by CURLE_RTSP_CSEQ_ERROR in rtsp_done. Closes https://github.com/curl/curl/pull/8525 --- lib/rtsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rtsp.c b/lib/rtsp.c index f16e87c12d..726bfb9ae1 100644 --- a/lib/rtsp.c +++ b/lib/rtsp.c @@ -219,7 +219,7 @@ static CURLcode rtsp_done(struct Curl_easy *data, httpStatus = Curl_http_done(data, status, premature); - if(rtsp) { + if(rtsp && !status && !httpStatus) { /* Check the sequence numbers */ long CSeq_sent = rtsp->CSeq_sent; long CSeq_recv = rtsp->CSeq_recv; -- 2.47.3