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