diff --git a/server/wsproxy/app.cc b/server/wsproxy/app.cc index db5adf4..c561686 100644 --- a/server/wsproxy/app.cc +++ b/server/wsproxy/app.cc @@ -86,8 +86,8 @@ static void SavePerfLog() bool App::Init(int argc, char* argv[]) { signal(SIGPIPE, SIG_IGN); - this->argc = argc; - this->argv = argv; + this->argc_ = argc; + this->argv_ = argv; if (!ParseOpt()) { terminated = true; @@ -486,7 +486,7 @@ void App::UnInitLog() bool App::ParseOpt() { int ch = 0; - while ((ch = getopt(argc, argv, "n:i:f:")) != -1) { + while ((ch = getopt(argc_, argv_, "n:i:f:")) != -1) { switch (ch) { case 'n': { @@ -503,7 +503,7 @@ bool App::ParseOpt() std::vector strings; a8::Split(optarg, strings, ','); for (auto& str : strings) { - flags.insert(a8::XValue(str).GetInt()); + flags_.insert(a8::XValue(str).GetInt()); } } break; @@ -514,7 +514,7 @@ bool App::ParseOpt() bool App::HasFlag(int flag) { - return flags.find(flag) != flags.end(); + return flags_.find(flag) != flags_.end(); } void App::FreeSocketMsgQueue() diff --git a/server/wsproxy/app.h b/server/wsproxy/app.h index 37946d3..fc5c2db 100644 --- a/server/wsproxy/app.h +++ b/server/wsproxy/app.h @@ -63,16 +63,17 @@ private: void FreeUdpMsgQueue(); public: - int argc = 0; - char** argv = nullptr; volatile bool terminated = false; volatile bool shutdowned = false; - std::set flags; PerfMonitor perf; private: + int argc_ = 0; + char** argv_ = nullptr; + int node_id_ = 0; int instance_id_ = 0; + std::set flags_; std::shared_ptr uuid_; std::mutex *loop_mutex_ = nullptr;