aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Transports
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2016-10-17 18:51:49 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2016-10-17 18:51:49 +0000
commiteeb3e11184855bda3d5e17a2e4ab24c9ffe8e588 (patch)
treea2881764b850bd02f248d568ae6e47bd1a275fa8 /src/plugins/Transports
parentaa86f130b9eacf1d0be95a463f611ad152e03475 (diff)
downloadqmmp-eeb3e11184855bda3d5e17a2e4ab24c9ffe8e588.tar.gz
qmmp-eeb3e11184855bda3d5e17a2e4ab24c9ffe8e588.tar.bz2
qmmp-eeb3e11184855bda3d5e17a2e4ab24c9ffe8e588.zip
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
Diffstat (limited to 'src/plugins/Transports')
-rw-r--r--src/plugins/Transports/http/httpstreamreader.cpp4
1 files changed, 3 insertions, 1 deletions
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)