summaryrefslogtreecommitdiff
path: root/src/net/download.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-10-07 22:28:26 +0300
committerAndrei Karas <akaras@inbox.ru>2011-10-07 22:28:26 +0300
commitaf98cb5dea5644e0d95a5bf41c03655e4ab808ef (patch)
tree02cf26d058760b25412fea71d1fb25c3c1626570 /src/net/download.cpp
parent8bbb2cbef9ab7a8c095ef4cb0bfc29cd26c62213 (diff)
downloadplus-af98cb5dea5644e0d95a5bf41c03655e4ab808ef.tar.gz
plus-af98cb5dea5644e0d95a5bf41c03655e4ab808ef.tar.bz2
plus-af98cb5dea5644e0d95a5bf41c03655e4ab808ef.tar.xz
plus-af98cb5dea5644e0d95a5bf41c03655e4ab808ef.zip
Fix code style.
Diffstat (limited to 'src/net/download.cpp')
-rw-r--r--src/net/download.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp
index 93417197e..969318b19 100644
--- a/src/net/download.cpp
+++ b/src/net/download.cpp
@@ -49,17 +49,17 @@ namespace Net
{
Download::Download(void *ptr, const std::string &url,
- DownloadUpdate updateFunction, bool ignoreError):
- mPtr(ptr),
- mUrl(url),
- mFileName(""),
- mWriteFunction(NULL),
- mAdler(0),
- mUpdateFunction(updateFunction),
- mThread(NULL),
- mCurl(NULL),
- mHeaders(NULL),
- mIgnoreError(ignoreError)
+ DownloadUpdate updateFunction, bool ignoreError) :
+ mPtr(ptr),
+ mUrl(url),
+ mFileName(""),
+ mWriteFunction(NULL),
+ mAdler(0),
+ mUpdateFunction(updateFunction),
+ mThread(NULL),
+ mCurl(NULL),
+ mHeaders(NULL),
+ mIgnoreError(ignoreError)
{
mError = static_cast<char*>(calloc(CURL_ERROR_SIZE + 1, 1));
mError[0] = 0;
@@ -72,6 +72,7 @@ Download::~Download()
if (mHeaders)
curl_slist_free_all(mHeaders);
+ mHeaders = 0;
int status;
if (mThread && SDL_GetThreadID(mThread))
SDL_WaitThread(mThread, &status);
@@ -261,7 +262,7 @@ int Download::downloadThread(void *ptr)
case CURLE_COULDNT_CONNECT:
default:
logger->log("curl error %d: %s host: %s",
- res, d->mError, d->mUrl.c_str());
+ res, d->mError, d->mUrl.c_str());
break;
}