A hack to let it work on Ubuntu 18.04, with degraded logging.

This commit is contained in:
Robert J. Hansen
2020-06-30 15:54:52 -04:00
parent c4a7687c54
commit 666dc67d20
3 changed files with 6 additions and 6 deletions

View File

@@ -7,8 +7,8 @@ set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(PythonInterp REQUIRED)
find_package(Threads REQUIRED)
find_package(Boost 1.66.0 REQUIRED COMPONENTS program_options system)
find_package(Boost 1.65.0 REQUIRED COMPONENTS program_options system)
include(GNUInstallDirs)
set(PKGDATADIR ${CMAKE_INSTALL_FULL_DATADIR}/nsrlsvr)
add_subdirectory(src)
add_subdirectory(man1)
add_subdirectory(man1)

View File

@@ -91,7 +91,7 @@ auto getCommand(const string& cmdstring) {
} // namespace
void handle_client(tcp::iostream& stream) {
const string ipaddr = stream.socket().remote_endpoint().address().to_string();
// const string ipaddr = stream.socket().remote_endpoint().address().to_string();
unsigned long long queries = 0;
try {
bool byebye = false;
@@ -155,6 +155,6 @@ void handle_client(tcp::iostream& stream) {
}
stringstream status_msg;
status_msg << ipaddr << " closed session after " << queries << " queries";
// status_msg << ipaddr << " closed session after " << queries << " queries";
log(LogLevel::ALERT, status_msg.str());
}

View File

@@ -318,8 +318,8 @@ int main(int argc, char* argv[]) {
if (error) {
continue;
}
string ipaddr = stream.socket().remote_endpoint().address().to_string();
log(LogLevel::ALERT, string("accepted a client: ") + ipaddr);
// string ipaddr = stream.socket().remote_endpoint().address().to_string();
// log(LogLevel::ALERT, string("accepted a client: ") + ipaddr);
if (0 == fork()) {
log(LogLevel::ALERT, "calling handle_client");