diff --git a/powerapi-0.patch b/powerapi-0.patch new file mode 100644 index 0000000000000000000000000000000000000000..b3d0e57e230642762207adedcd9fe0d57513d72a --- /dev/null +++ b/powerapi-0.patch @@ -0,0 +1,36 @@ +From cd6bd63738ea2abb5ac953e976fca6d1cfcbd545 Mon Sep 17 00:00:00 2001 +From: queyanwen +Date: Wed, 27 Dec 2023 15:43:28 +0800 +Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E8=A7=A3=E5=86=B3=E9=97=AE=E9=A2=98?= + =?UTF-8?q?=EF=BC=9A=E6=88=B7=E7=AB=AF=E4=B8=BB=E5=8A=A8=E6=96=AD=E9=93=BE?= + =?UTF-8?q?=EF=BC=8C=E6=9C=8D=E5=8A=A1=E7=AB=AF=E9=94=99=E5=8F=AA=E4=BC=9A?= + =?UTF-8?q?=E6=B8=85=E7=90=86index=200=E7=9A=84=E8=B5=84=E6=BA=90?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + pwrapis/src/server.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/pwrapis/src/server.c b/pwrapis/src/server.c +index b3f3fa6..1a1767b 100644 +--- a/pwrapis/src/server.c ++++ b/pwrapis/src/server.c +@@ -230,10 +230,10 @@ static void AcceptConnection(void) + Logger(INFO, MD_NM_SVR, "Create new connection succeed. fd:%d, sysId:%d", client.fd, client.sysId); + } + +-static void CleanClientResource(PwrClient *pwrClient, int idx) ++static void CleanClientResource(PwrClient clients[], int idx) + { +- CleanControlAuth(pwrClient->sysId); +- CleanDataCollTaskByClient(pwrClient->sysId); ++ CleanControlAuth(clients[idx].sysId); ++ CleanDataCollTaskByClient(clients[idx].sysId); + DeleteFromClientList(g_pwrClients, idx); + } + +-- +Gitee + diff --git a/powerapi-1.0.1.tar.gz b/powerapi-1.0.1.tar.gz index c717286e2e56945fb5c5449146b383ead358f317..35409ab11f4d6e5d9f4df73ca32441d794d8ebe4 100644 Binary files a/powerapi-1.0.1.tar.gz and b/powerapi-1.0.1.tar.gz differ diff --git a/powerapi.spec b/powerapi.spec index e7ad27e2ae8e6e585bd0721bfd54a3de7d4a353e..3bad9408826c6a334c349c3e284f9b6df1c42aab 100644 --- a/powerapi.spec +++ b/powerapi.spec @@ -1,11 +1,12 @@ Name: powerapi Version: 1.0.1 -Release: 1 +Release: 2 Summary: The ability to support openEuler power consumption control. License: MulanPSL-2.0 URL: https://gitee.com/openeuler/powerapi/ Source0: %{name}-%{version}.tar.gz +Patch0: powerapi-0.patch BuildRequires: gcc,cmake,zip,unzip @@ -20,13 +21,11 @@ BuildRequires: gcc,cmake,zip,unzip Contains the client and server components and API header files for powerapi integration development. %prep -%autosetup - +%autosetup -p1 %build sh build.sh release - %install install -d %{buildroot}/%{_sysconfdir}/sysconfig/pwrapis cp release/pwrapis/conf/pwrapis_config.ini %{buildroot}/%{_sysconfdir}/sysconfig/pwrapis @@ -68,6 +67,9 @@ systemctl stop pwrapis %{_sysconfdir}/systemd/system/pwrapis.service %changelog +* Wed Dec 27 2023 xuchongyu - 1.0.1-2 +- Solve the problem that the client is actively disconnected and the server is incorrect in clearing resources + * Sat Dec 23 2023 queyanwen - 1.0.1-1 - Change the version number for the first releasing