mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-21 10:09:13 +00:00
parent
dc4431f71b
commit
ead1dc0545
4 changed files with 7 additions and 17 deletions
|
|
@ -970,8 +970,8 @@ static int handle_lua_request(struct mg_connection *conn) {
|
|||
snprintf(path, sizeof(path), "%s/lua/metrics.lua",
|
||||
httpserver->get_scripts_dir());
|
||||
else if(strncmp(request_info->uri, "/plugins/", 9) == 0)
|
||||
snprintf(path, sizeof(path), "%s/plugins/scripts/%s",
|
||||
httpserver->get_runtime_dir(), request_info->uri + 9);
|
||||
snprintf(path, sizeof(path), "%s/scripts/%s",
|
||||
ntop->get_plugins_dir(), request_info->uri + 9);
|
||||
else
|
||||
snprintf(path, sizeof(path), "%s%s%s",
|
||||
httpserver->get_scripts_dir(),
|
||||
|
|
@ -1179,7 +1179,7 @@ int init_client_x509_auth(void *ctx) {
|
|||
|
||||
/* ****************************************** */
|
||||
|
||||
HTTPserver::HTTPserver(const char *_docs_dir, const char *_scripts_dir, const char *_runtime_dir) {
|
||||
HTTPserver::HTTPserver(const char *_docs_dir, const char *_scripts_dir) {
|
||||
bool good_ssl_cert = false;
|
||||
struct timeval tv;
|
||||
|
||||
|
|
@ -1217,7 +1217,6 @@ HTTPserver::HTTPserver(const char *_docs_dir, const char *_scripts_dir, const ch
|
|||
gui_access_restricted = true;
|
||||
|
||||
docs_dir = strdup(_docs_dir), scripts_dir = strdup(_scripts_dir);
|
||||
runtime_dir = strdup(_runtime_dir);
|
||||
ssl_enabled = false;
|
||||
httpserver = this;
|
||||
#ifdef HAVE_NEDGE
|
||||
|
|
@ -1354,7 +1353,7 @@ HTTPserver::~HTTPserver() {
|
|||
|
||||
if(wispr_captive_data) free(wispr_captive_data);
|
||||
if(captive_redirect_addr) free(captive_redirect_addr);
|
||||
free(docs_dir), free(scripts_dir), free(runtime_dir);
|
||||
free(docs_dir), free(scripts_dir);
|
||||
ntop->getTrace()->traceEvent(TRACE_NORMAL, "HTTP server terminated");
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue