From: HelenMamontova <44774239+HelenMamontova@users.noreply.github.com> Date: Mon, 27 Jan 2025 14:16:11 +0000 (+0200) Subject: Radius (#7) X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/37324ea9b8c06d96b9383be993da02a01f103253?ds=sidebyside;hp=37324ea9b8c06d96b9383be993da02a01f103253 Radius (#7) * Radius. Header file , added. Functions start, stop declaration changed. Class members m_thread, m_mutex added. Function Run declaration added. * Radius. Header files added. Functions Start, Stop, Run definition added. * Radius. New files server.h, server.cpp added. * Radius. Definition of functions startReceive, makeResponse, handleSend, handleReceive added. * The Run function name fixed. Definition of secret variable sdded. * The file server.cpp added to add_library command, command find_package(OpenSSL 1.0.0 Required) added, OpenSSL::Crypto added to target_link_libraries command in the block if(BUILD_MOD_RADIUS). * Parameter token added to function Run() declaration. * Radius. Method Start: variable isRunning=true removed, m_thread definition changed. Method Stop: variable isRunning=false removed, m_thread.joinable check added, isRunning check added, request_stop call added. Method Run: parameter token added, variables secret, port removed, object lock and isRunning=true added before cycle while, cycle while added, isRunning=false added after cycle while. * Radius. Hold the mutex removed,extra conditions for m_thread.join() removed in the Stop function. * Radius. Cycle while removed in function Run. * Radius. The variables isRunning, errorStr replaced by m_running, m_errorStr in class Radius. * Radius. The variable isRunning replaced by m_running in function Run. * Radius. Object name io_service changed to ioService in the function Run. * Method SetRunning declaration added to the class RADIUS. * Method SetRunning definition added. Method SetRunning call added to function Run. * Radius. Namespace STG added. * Radius. Declaration using STG::Server added. * Radius. Header file "stg/logger.h" added. RADIUS class member m_loger added. * Radius. Header file "stg/common.h" added. Initialization of m_logger added to constructor RADIUS. Output cerr replaced by logger and printfd(). * Radius. Variable except added, messages fixed in the function Run. * Radius. Thread join logic fixed in the function Stop. * Keyword const added to std::lock_guard in the function SetRunning. * Radius. Class member m_mutex moved to the top of list. * Radius. Class member m_logger put after the m_running. * Radius. Unnecessary variable except removed in the function Run. * Radius. Extra whitespace removed in the function Stop. Function IsRunning definition added. * Radius. Function IsRunning declaration changed. * Radius. Formatting fixed. * Radius. Extra symbols '//' removed. * Radius. Class member m_running initialization added to constructor RADIUS. ---