From e274b09c0ff198e1687d6e6e34e0ecbf0cd23fbd Mon Sep 17 00:00:00 2001 From: windows11 <windows11@pc> Date: Fri, 21 Jan 2022 15:48:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A2=9E=E5=88=A0=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E6=9C=88=E6=B5=81=E9=87=8F=E9=94=99=E8=AF=AF=E9=80=82?= =?UTF-8?q?=E9=85=8D=EF=BC=8C=E7=BD=AE0=EF=BC=8C=20todo:=E7=AD=89=E5=BE=85?= =?UTF-8?q?=E5=85=A8=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/src/main.cpp b/server/src/main.cpp index 11b2526..bcf3575 100644 --- a/server/src/main.cpp +++ b/server/src/main.cpp @@ -438,8 +438,12 @@ int CMain::ReadConfig() if(ID < 0 || ID >= NET_MAX_CLIENTS) continue; - Client(ID)->m_LastNetworkIN = rStart[i]["last_network_in"].u.integer; - Client(ID)->m_LastNetworkOUT = rStart[i]["last_network_out"].u.integer; + // check name and host for match , when ServerStatus reload month traffic. + if(strcmp(Client(ID)->m_aName, rStart[i]["name"].u.string.ptr)==0 && strcmp(Client(ID)->m_aHost, rStart[i]["host"].u.string.ptr)==0) + { + Client(ID)->m_LastNetworkIN = rStart[i]["last_network_in"].u.integer; + Client(ID)->m_LastNetworkOUT = rStart[i]["last_network_out"].u.integer; + } ID++; }