From eeb3e11184855bda3d5e17a2e4ab24c9ffe8e588 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 17 Oct 2016 18:51:49 +0000 Subject: http: fixed issue with uploaded files (#883) git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@6783 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Transports/http/httpstreamreader.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/Transports/http/httpstreamreader.cpp b/src/plugins/Transports/http/httpstreamreader.cpp index 82a5e2f29..717276964 100644 --- a/src/plugins/Transports/http/httpstreamreader.cpp +++ b/src/plugins/Transports/http/httpstreamreader.cpp @@ -274,6 +274,7 @@ void HttpStreamReader::abort() curl_easy_cleanup(m_handle); m_handle = 0; } + QIODevice::close(); } qint64 HttpStreamReader::bytesAvailable() const @@ -285,6 +286,7 @@ void HttpStreamReader::run() { qDebug("HttpStreamReader: starting download thread"); char errorBuffer[CURL_ERROR_SIZE]; + memset(errorBuffer, 0, sizeof(errorBuffer)); m_handle = curl_easy_init(); //proxy if (QmmpSettings::instance()->isProxyEnabled()) @@ -351,8 +353,8 @@ void HttpStreamReader::run() { setErrorString(errorBuffer); emit error(); + QIODevice::close(); } - QIODevice::close(); } qint64 HttpStreamReader::readBuffer(char* data, qint64 maxlen) -- cgit v1.2.3-13-gbd6f