windows pthread_t is uncooperative, just check this instead

This commit is contained in:
jacob1 2016-06-11 13:08:27 -04:00
parent 5b5390f822
commit 7e4924e7ab
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}

View File

@ -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];