fflush(stdout);
}
+ ServerInstance->Log(DEBUG, "ServerConfig::Downloading %d %d", TotalDownloaded, IncludedFiles.size());
+
/* Returns true if there are still files in the process of downloading */
return (TotalDownloaded < IncludedFiles.size());
}
if (x != IncludedFiles.end())
{
- TotalDownloaded++;
if (error)
{
delete x->second;
x->second = NULL;
FileErrors++;
}
+ TotalDownloaded++;
}
return;
void ServerConfig::StartDownloads()
{
- ServerInstance->Log(DEBUG,"StartDownloads() size=%d", IncludedFiles.size());
+ ServerInstance->Log(DEBUG,"((((((((((((((((((((((((( StartDownloads() size=%d )))))))))))))))))))))))))))))))))))))", IncludedFiles.size());
/* Reads all local files into the IncludedFiles map, then initiates sockets for the remote ones */
for (std::map<std::string, std::istream*>::iterator x = IncludedFiles.begin(); x != IncludedFiles.end(); ++x)
{
+ if (CompletedFiles.find(x->first) != CompletedFiles.end())
+ continue;
+
+ ServerInstance->Log(DEBUG,"StartDownloads File: %s", x->first.c_str());
+
std::string file = x->first;
if ((file[0] == '/') || (file.substr(0, 7) == "file://"))
{
x->second = NULL;
}
}
+ CompletedFiles[x->first] = true;
}
}