mirror of
https://github.com/rjhansen/nsrlsvr.git
synced 2026-01-09 14:28:05 -05:00
A hack to let it work on Ubuntu 18.04, with degraded logging.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user