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