diff --git a/samples/vboxwrapper/vbox.cpp b/samples/vboxwrapper/vbox.cpp index 984cffc748..85a41d412c 100644 --- a/samples/vboxwrapper/vbox.cpp +++ b/samples/vboxwrapper/vbox.cpp @@ -276,7 +276,7 @@ void VBOX_VM::poll(bool log_state) { command = "showvminfo \"" + vm_name + "\" "; command += "--machinereadable "; - if (vbm_popen(command, output, "VM state", false, false) == 0) { + if (vbm_popen(command, output, "VM state", false, false, 45, false) == 0) { vmstate_start = output.find("VMState=\""); if (vmstate_start != string::npos) { vmstate_start += 9; @@ -2291,6 +2291,7 @@ int VBOX_VM::launch_vboxsvc() { ); } + vbm_trace(command, std::string(""), retval); } } } @@ -2303,9 +2304,11 @@ int VBOX_VM::launch_vboxsvc() { int VBOX_VM::launch_vboxvm() { char buf[256]; char error_msg[256]; - int retval = ERR_EXEC; + char cmdline[1024]; char* argv[5]; int argc; + std::string output; + int retval = ERR_EXEC; // Construct the command line parameters // @@ -2324,8 +2327,15 @@ int VBOX_VM::launch_vboxvm() { argv[4] = NULL; argc = 4; + strcpy(cmdline, ""); + for (int i=0; i