From 0cc34f5420666f2c709cf44770fa4963ba4ae42b Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 29 Aug 2014 14:20:38 -0700 Subject: [PATCH] better warning solution;. fix nScriptCheckThreads. --- src/bitcoindjs.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/bitcoindjs.cc b/src/bitcoindjs.cc index 8a03f085..7b94e6c7 100644 --- a/src/bitcoindjs.cc +++ b/src/bitcoindjs.cc @@ -140,7 +140,7 @@ NAN_METHOD(StartBitcoind) { } // Run on a separate thead: - // int log_fd = parse_logs(NULL); + int log_fd = parse_logs(NULL); // handle->Set(NanNew("log"), NanNew(log_fd)); Local callback = Local::Cast(args[0]); @@ -232,7 +232,7 @@ async_after(uv_work_t *req) { * the logging and argument parsing. */ -const int nScriptCheckThreads = 0; +const int _nScriptCheckThreads = 0; static int start_node(void) { @@ -241,7 +241,7 @@ start_node(void) { detectShutdownThread = new boost::thread( boost::bind(&DetectShutdownThread, &threadGroup)); - for (int i = 0; i < nScriptCheckThreads - 1; i++) { + for (int i = 0; i < _nScriptCheckThreads - 1; i++) { threadGroup.create_thread(&ThreadScriptCheck); } @@ -284,7 +284,9 @@ const char bitcoind_char[256] = { static unsigned int parse_logs(char **log_str) { - goto disabled; +#ifndef PARSE_LOGS_ENABLED + return 0; +#endif int pfd[2]; pipe(pfd); @@ -379,9 +381,6 @@ parse_logs(char **log_str) { } return read_log; - -disabled: - return 0; } /**