From 980b8c6d69879893436ef5dabcf790516d126fb1 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Tue, 11 Feb 2014 16:16:21 -0500 Subject: [PATCH] VBOX: VboxManage returns an exit code of 0 when a RPC_S_SERVER_UNAVAILABLE error occurs. Special case the error. --- samples/vboxwrapper/vbox.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/samples/vboxwrapper/vbox.cpp b/samples/vboxwrapper/vbox.cpp index 4d6830f7f1..b4eb0d7684 100644 --- a/samples/vboxwrapper/vbox.cpp +++ b/samples/vboxwrapper/vbox.cpp @@ -2882,6 +2882,11 @@ CLEANUP: sscanf(errcode.c_str(), "%x", &retval); } + // If something couldn't be found, just return ERR_FOPEN + if (!retval) retval = ERR_FOPEN; + + } else { + // Is this a RPC_S_SERVER_UNAVAILABLE returned by vboxsvc? if (!retval) { if (output.find("RPC_S_SERVER_UNAVAILABLE") != string::npos) { @@ -2889,9 +2894,6 @@ CLEANUP: } } - // If something couldn't be found, just return ERR_FOPEN - if (!retval) retval = ERR_FOPEN; - } #else