Permalink
Browse files

windows pthread_t is uncooperative, just check this instead

  • Loading branch information...
jacob1 committed Jun 11, 2016
1 parent 5b5390f commit 7e4924e7ab4c91565a2f691fd9553cb5f9cd6579
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/client/DownloadManager.cpp
  2. +1 −1 src/client/HTTP.cpp
@@ -38,7 +38,7 @@ void DownloadManager::Shutdown()
managerShutdown = true;
pthread_mutex_unlock(&downloadAddLock);
pthread_mutex_unlock(&downloadLock);
if (downloadThread != 0)
if (threadStarted)
pthread_join(downloadThread, NULL);
}

@@ -946,7 +946,7 @@ std::string FindBoundary(std::map<std::string, std::string> parts, std::string b
for (std::map<std::string, std::string>::iterator iter = parts.begin(); iter != parts.end(); iter++)
{
// loop through every character in each part and search for the substring, adding 1 to map for every character found (character after the substring)
for (ssize_t j = 0; j < (ssize_t)((*iter).second.length())-blen; j++)
for (ssize_t j = 0; j < (ssize_t)((*iter).second.length()-blen); j++)
if (!blen || (*iter).second.substr(j, blen) == boundary)
{
unsigned char ch = (*iter).second[j+blen];

0 comments on commit 7e4924e

Please sign in to comment.