diff --git a/src/net/common/transferhelper.cpp b/src/net/common/transferhelper.cpp index d4094981..5b8e6ebd 100644 --- a/src/net/common/transferhelper.cpp +++ b/src/net/common/transferhelper.cpp @@ -156,5 +156,4 @@ boost::shared_ptr TransferHelper::GetData() { return m_data; -} - +} \ No newline at end of file diff --git a/src/net/common/uploaderthread.cpp b/src/net/common/uploaderthread.cpp index 4133c2ae..5f313266 100644 --- a/src/net/common/uploaderthread.cpp +++ b/src/net/common/uploaderthread.cpp @@ -55,7 +55,7 @@ UploaderThread::Main() { if (m_uploadInProgress) { - m_uploadInProgress = m_uploadHelper->Process(); + m_uploadInProgress = !m_uploadHelper->Process(); } if (!m_uploadInProgress) @@ -73,7 +73,7 @@ UploaderThread::Main() if (!data.filename.empty() && data.filesize > 0) { path filepath(data.filename); - m_uploadHelper->Init("url" + filepath.leaf(), filepath.file_string().c_str(), "user", "pwd"); + m_uploadHelper->Init("url" + filepath.leaf(), filepath.file_string().c_str(), "user", "pw"); m_uploadInProgress = true; } } diff --git a/src/net/common/uploadhelper.cpp b/src/net/common/uploadhelper.cpp index 34550254..bc32350c 100644 --- a/src/net/common/uploadhelper.cpp +++ b/src/net/common/uploadhelper.cpp @@ -64,7 +64,7 @@ UploadHelper::InternalInit(const string &/*url*/, const string &targetFileName, // Assume that the following calls never fail. curl_easy_setopt(GetData()->curlHandle, CURLOPT_READFUNCTION, readFunction); curl_easy_setopt(GetData()->curlHandle, CURLOPT_READDATA, GetData()->targetFile); - curl_easy_setopt(GetData()->curlHandle, CURLOPT_INFILESIZE_LARGE, filesize); + curl_easy_setopt(GetData()->curlHandle, CURLOPT_INFILESIZE_LARGE, (curl_off_t)filesize); curl_easy_setopt(GetData()->curlHandle, CURLOPT_USERPWD, GetData()->userCredentials.c_str()); curl_easy_setopt(GetData()->curlHandle, CURLOPT_UPLOAD, 1L); curl_easy_setopt(GetData()->curlHandle, CURLOPT_PUT, 1L);