Added API port to summary.

This commit is contained in:
XMRig 2017-09-02 15:50:27 +03:00
parent 38e93ed6e3
commit d0db4770ed
2 changed files with 18 additions and 0 deletions

View file

@ -205,6 +205,7 @@ if (WITH_HTTPD AND MHD_FOUND)
set(HTTPD_SOURCES src/api/Httpd.h src/api/Httpd.cpp)
else()
add_definitions(/DXMRIG_NO_HTTPD)
add_definitions(/DXMRIG_NO_API)
endif()
include_directories(src)

View file

@ -127,6 +127,18 @@ static void print_pools()
}
#ifndef XMRIG_NO_API
static void print_api()
{
if (Options::i()->apiPort() == 0) {
return;
}
Log::i()->text(Options::i()->colors() ? "\x1B[01;32m * \x1B[01;37mAPI PORT: \x1B[01;36m%d" : " * API PORT: %d", Options::i()->apiPort());
}
#endif
static void print_commands()
{
if (Options::i()->colors()) {
@ -145,6 +157,11 @@ void Summary::print()
print_cpu();
print_threads();
print_pools();
# ifndef XMRIG_NO_API
print_api();
# endif
print_commands();
}