summaryrefslogtreecommitdiff
path: root/src/net/download.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-10-17 22:07:24 +0300
committerAndrei Karas <akaras@inbox.ru>2011-10-17 22:07:24 +0300
commitd14bb7a27ee23cc83b3af1db2f1976eaaa55d78a (patch)
tree5f128768c66436eefd70632f02889607596609d4 /src/net/download.cpp
parentf1e92aca00a4859047e83fab76220767b9a2f814 (diff)
parente93e6beb456d105987da3190c2a80847b6900081 (diff)
downloadmanaverse-d14bb7a27ee23cc83b3af1db2f1976eaaa55d78a.tar.gz
manaverse-d14bb7a27ee23cc83b3af1db2f1976eaaa55d78a.tar.bz2
manaverse-d14bb7a27ee23cc83b3af1db2f1976eaaa55d78a.tar.xz
manaverse-d14bb7a27ee23cc83b3af1db2f1976eaaa55d78a.zip
Merge branch 'master' into strippedstripped1.1.10.16
Conflicts: data/fonts/mplus-1p-bold.ttf data/fonts/mplus-1p-regular.ttf
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;
}