From d54c49853caa4062429924a2ee792f42ef82a090 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Wed, 18 Sep 2013 15:00:30 -0400 Subject: [PATCH] VBOX: Be a bit more defensive and set all the state flags anytime the VM state is polled. --- samples/vboxwrapper/vbox.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/samples/vboxwrapper/vbox.cpp b/samples/vboxwrapper/vbox.cpp index 6426647462..4545119fce 100644 --- a/samples/vboxwrapper/vbox.cpp +++ b/samples/vboxwrapper/vbox.cpp @@ -593,31 +593,50 @@ void VBOX_VM::poll(bool log_state) { if (vmstate == "running") { online = true; suspended = false; + crashed = false; } else if (vmstate == "paused") { online = true; suspended = true; + crashed = false; } else if (vmstate == "starting") { online = true; + suspended = false; + crashed = false; } else if (vmstate == "stopping") { online = true; + suspended = false; + crashed = false; } else if (vmstate == "saving") { online = true; + suspended = false; + crashed = false; } else if (vmstate == "restoring") { online = true; + suspended = false; + crashed = false; } else if (vmstate == "livesnapshotting") { online = true; + suspended = false; + crashed = false; } else if (vmstate == "deletingsnapshotlive") { online = true; + suspended = false; + crashed = false; } else if (vmstate == "deletingsnapshotlivepaused") { online = true; + suspended = false; + crashed = false; } else if (vmstate == "aborted") { online = false; + suspended = false; crashed = true; } else if (vmstate == "gurumeditation") { online = false; + suspended = false; crashed = true; } else { online = false; + suspended = false; crashed = false; if (log_state) { fprintf(