x->second = NULL;
FileErrors++;
}
- else
- {
- ServerInstance->Log(DEBUG,"Recursively follow conf %s", x->first.c_str());
- LoadConf(newconfig, x->first.c_str(), errstr, 0, x->second);
- StartDownloads();
- }
TotalDownloaded++;
}
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://"))
{
if (Config->FileErrors)
{
- /* One or more file download/access errors, do not
- * proceed to second pass
- */
for (std::map<std::string, std::istream*>::iterator x = Config->IncludedFiles.begin(); x != Config->IncludedFiles.end(); ++x)
{
if (!x->second)
{
for (std::map<BufferedSocket*,BufferedSocket*>::iterator x = SocketCull.begin(); x != SocketCull.end(); ++x)
{
+ Log(DEBUG,"Cull socket");
SE->DelFd(x->second);
x->second->Close();
delete x->second;
void SocketTimeout::Tick(time_t)
{
+ ServerInstance->Log(DEBUG,"SocketTimeout::Tick");
+
if (ServerInstance->SE->GetRef(this->sfd) != this->sock)
return;
this->port = 80;
response = NULL;
closed = false;
+ timeout_val = 10;
}
HTTPSocket::~HTTPSocket()
bool HTTPSocket::OnDataReady()
{
- Instance->Log(DEBUG,"HTTPSocket::OnDataReady()");
+ Instance->Log(DEBUG,"HTTPSocket::OnDataReady() for %s", url.url.c_str());
char *data = this->Read();
if (!data)
Module* target = ServerInstance->Modules->Find("m_http_client.so");
if (target)
{
- ServerInstance->Log(DEBUG,"Claiming schema http://, making fetch request");
+ ServerInstance->Log(DEBUG,"Claiming schema http://, making fetch request for %s", name.c_str());
HTTPClientRequest* req = new HTTPClientRequest(ServerInstance, this, target, name);
req->Send();