From aa658131a76f215ffff0fa65f015f5f8875a5d4e Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Wed, 17 Jul 2024 02:02:51 +0700 Subject: [PATCH] some review --- openrouter/src/OpenRouter/OpenRouter.cpp | 4 ++-- openrouter/src/OpenRouter/OpenRouter.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openrouter/src/OpenRouter/OpenRouter.cpp b/openrouter/src/OpenRouter/OpenRouter.cpp index 7a562b5..b45d6ae 100644 --- a/openrouter/src/OpenRouter/OpenRouter.cpp +++ b/openrouter/src/OpenRouter/OpenRouter.cpp @@ -52,11 +52,11 @@ OpenRouter::OpenRouter() { OpenRouter::~OpenRouter() = default; -int OpenRouter::serve(const std::string *ip, int port, int socket_flags) { +int OpenRouter::serve(const std::string &ip, int port, int socket_flags) { std::cout << GREEN << "Starting" << RESET << " server on [ " << YELLOW << "0.0.0.0" << RESET << ":" << CYAN << "43244" << RESET << " ]" << std::endl; syslog(LOG_INFO, "openrouter administration software started."); - srv.listen("127.0.0.1", 43244); + this->srv.listen(ip, port, socket_flags); return 0; } diff --git a/openrouter/src/OpenRouter/OpenRouter.hpp b/openrouter/src/OpenRouter/OpenRouter.hpp index a0f6b51..916cce8 100644 --- a/openrouter/src/OpenRouter/OpenRouter.hpp +++ b/openrouter/src/OpenRouter/OpenRouter.hpp @@ -13,7 +13,7 @@ class OpenRouter { public: OpenRouter(); ~OpenRouter(); - int serve(const std::string *ip, int port, int socket_flags = 0); + int serve(const std::string &ip, int port, int socket_flags = 0); }; #endif // OPENROUTER_HPP \ No newline at end of file