From: Jay Satiro Date: Mon, 28 Feb 2022 19:28:37 +0000 (-0500) Subject: rtsp: don't let CSeq error override earlier errors X-Git-Tag: curl-7_83_0~143 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=acf46b1bba317fbe2024fc27e54774dc23b9c0de;p=thirdparty%2Fcurl.git 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 --- 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;