VBOX: VboxManage returns an exit code of 0 when a RPC_S_SERVER_UNAVAILABLE error occurs. Special case the error.

This commit is contained in:
Rom Walton 2014-02-11 16:16:21 -05:00
parent 17e44af601
commit 980b8c6d69
1 changed files with 5 additions and 3 deletions

View File

@ -2882,6 +2882,11 @@ CLEANUP:
sscanf(errcode.c_str(), "%x", &retval); 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? // Is this a RPC_S_SERVER_UNAVAILABLE returned by vboxsvc?
if (!retval) { if (!retval) {
if (output.find("RPC_S_SERVER_UNAVAILABLE") != string::npos) { 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 #else