summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp42
1 files changed, 7 insertions, 35 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 47c8ec234..5b2cdd9d4 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -1256,42 +1256,10 @@ void ServerConfig::Read(bool bail, User* user, int pass)
ServerInstance->WriteOpers("*** Successfully rehashed server.");
}
-bool ServerConfig::Downloading()
+/* XXX: This can and will block! */
+void ServerConfig::DoDownloads()
{
- if (isatty(0) && isatty(1) && isatty(2))
- {
- printf(".");
- 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());
-}
-
-void ServerConfig::Complete(const std::string &filename, bool error)
-{
- ServerInstance->Log(DEBUG,"Flag complete: %s %d", filename.c_str(), error);
- std::map<std::string, std::istream*>::iterator x = IncludedFiles.find(filename);
-
- if (x != IncludedFiles.end())
- {
- 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,"In DoDownloads()");
/* 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)
@@ -1340,6 +1308,10 @@ void ServerConfig::StartDownloads()
delete x->second;
x->second = NULL;
}
+ else
+ {
+ /* Search new file here for more includes to parse */
+ }
}
CompletedFiles[x->first] = true;
}