src/Virt_VirtualSystemManagementService.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
# HG changeset patch
# User Eduardo Lima (Etrunko) <eblima(a)br.ibm.com>
# Date 1317242639 10800
# Node ID e02b7fef37d7f1f6a18d68991dc1409eef8905ec
# Parent 942e9fa22bcb2681884cb39e1dcfc459c67ce197
VirtualSystemManagementService: Avoid extra connection to libvirt
Function update_device_info() has been called in after a creating a connection
to libvirt, while the itself creates a new connection. Moving the function call
a few lines above adresses this issue.
Signed-off-by: Eduardo Lima (Etrunko) <eblima(a)br.ibm.com>
diff --git a/src/Virt_VirtualSystemManagementService.c
b/src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c
+++ b/src/Virt_VirtualSystemManagementService.c
@@ -2331,6 +2331,8 @@
return s;
}
+ update_dominfo(dominfo, refcn);
+
conn = connect_by_classname(_BROKER, refcn, &s);
if (conn == NULL) {
CU_DEBUG("Failed to connect");
@@ -2347,8 +2349,6 @@
goto out;
}
- update_dominfo(dominfo, refcn);
-
if (!domain_online(dom)) {
CU_DEBUG("VS `%s' not online; skipping dynamic update",
dominfo->name);