added remote command <--reload/-O> and JSON/XML-RPC method <reload> to reload configuration from disk and reintialize the program; the reload can be performed from web-interface

This commit is contained in:
Andrey Prygunkov
2012-09-27 20:13:25 +00:00
parent fdc9464576
commit 8b1aff33fe
20 changed files with 302 additions and 73 deletions

View File

@@ -50,7 +50,7 @@
#include "Util.h"
extern Options* g_pOptions;
extern char* (*szEnvironmentVariables)[];
extern char* (*g_szEnvironmentVariables)[];
extern DownloadQueueHolder* g_pDownloadQueueHolder;
static const int POSTPROCESS_PARCHECK_CURRENT = 91;
@@ -120,9 +120,9 @@ EnvironmentStrings::~EnvironmentStrings()
void EnvironmentStrings::InitFromCurrentProcess()
{
for (int i = 0; (*szEnvironmentVariables)[i]; i++)
for (int i = 0; (*g_szEnvironmentVariables)[i]; i++)
{
char* szVar = (*szEnvironmentVariables)[i];
char* szVar = (*g_szEnvironmentVariables)[i];
Append(strdup(szVar));
}
}