[RFC PATCH 03/10] netserver: Toggle service off during close

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rather than waiting until virNetServerDispose to toggle the service
to off, let's do that when virNetServerServiceClose is called such
as during virNetServerClose.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/rpc/virnetserver.c        | 3 ---
 src/rpc/virnetserverservice.c | 2 ++
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c
index 77a4c0b8d..7bab11efb 100644
--- a/src/rpc/virnetserver.c
+++ b/src/rpc/virnetserver.c
@@ -805,9 +805,6 @@ void virNetServerDispose(void *obj)
 
     VIR_FREE(srv->name);
 
-    for (i = 0; i < srv->nservices; i++)
-        virNetServerServiceToggle(srv->services[i], false);
-
     virThreadPoolFree(srv->workers);
 
     for (i = 0; i < srv->nservices; i++)
diff --git a/src/rpc/virnetserverservice.c b/src/rpc/virnetserverservice.c
index 4e5426ffe..636c5be4e 100644
--- a/src/rpc/virnetserverservice.c
+++ b/src/rpc/virnetserverservice.c
@@ -525,4 +525,6 @@ void virNetServerServiceClose(virNetServerServicePtr svc)
         virNetSocketClose(svc->socks[i]);
         virObjectUnref(svc);
     }
+
+    virNetServerServiceToggle(svc, false);
 }
-- 
2.13.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux