[libvirt] [PATCH 09/13] vsh: Make use of newly introduced client side hooks

Erik Skultety eskultet at redhat.com
Mon Jun 29 15:37:43 UTC 2015


---
 tools/vsh.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/tools/vsh.c b/tools/vsh.c
index 5f8461c..4eb5de2 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -1137,15 +1137,11 @@ vshCommandRun(vshControl *ctl, const vshCmd *cmd)
         struct timeval before, after;
         bool enable_timing = ctl->timing;
 
-        if ((ctl->conn == NULL || disconnected) &&
-            !(cmd->def->flags & VSH_CMD_FLAG_NOCONNECT))
-            vshReconnect(ctl);
-
         if (enable_timing)
             GETTIMEOFDAY(&before);
 
         if ((cmd->def->flags & VSH_CMD_FLAG_NOCONNECT) ||
-            vshConnectionUsability(ctl, ctl->conn)) {
+            (hooks && hooks->connHandler && hooks->connHandler(ctl))) {
             ret = cmd->def->handler(ctl, cmd);
         } else {
             /* connection is not usable, return error */
-- 
1.9.3




More information about the libvir-list mailing list