diff --git a/configure.ac b/configure.ac
index 6232526686..f7b90c166d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,7 +14,7 @@ AC_SUBST([LIBBOINC_VERSION])
WRAPPER_RELEASE=26011
AC_SUBST([WRAPPER_RELEASE])
-VBOXWRAPPER_RELEASE=26106
+VBOXWRAPPER_RELEASE=26107
AC_SUBST([VBOXWRAPPER_RELEASE])
AC_CANONICAL_TARGET
diff --git a/samples/vboxwrapper/vboxwrapper.cpp b/samples/vboxwrapper/vboxwrapper.cpp
index e05fc696f5..3f82e2cbdb 100644
--- a/samples/vboxwrapper/vboxwrapper.cpp
+++ b/samples/vboxwrapper/vboxwrapper.cpp
@@ -258,10 +258,12 @@ void read_checkpoint(double& elapsed, double& cpu, VBOX_VM& vm) {
}
void read_fraction_done(double& frac_done, VBOX_VM& vm) {
+ char path[MAXPATHLEN];
char buf[256];
double temp, frac = 0;
- FILE* f = fopen(vm.fraction_done_filename.c_str(), "r");
+ sprintf(path, "shared/%s", vm.fraction_done_filename.c_str());
+ FILE* f = fopen(path, "r");
if (!f) return;
// read the last line of the file
@@ -285,6 +287,26 @@ void read_fraction_done(double& frac_done, VBOX_VM& vm) {
frac_done = frac;
}
+void read_completion_file_info(unsigned long& exit_code, string& message, VBOX_VM& vm) {
+ char path[MAXPATHLEN];
+ char buf[1024];
+
+ exit_code = 0;
+ message = "";
+
+ sprintf(path, "shared/%s", vm.completion_trigger_file.c_str());
+ FILE* f = fopen(path, "r");
+ if (f) {
+ if (fgets(buf, 1024, f) != NULL) {
+ exit_code = atoi(buf);
+ }
+ while (fgets(buf, 1024, f) != NULL) {
+ message += buf;
+ }
+ fclose(f);
+ }
+}
+
// set CPU and network throttling if needed
//
void set_throttles(APP_INIT_DATA& aid, VBOX_VM& vm) {
@@ -407,26 +429,6 @@ void set_remote_desktop_info(APP_INIT_DATA& /* aid */, VBOX_VM& vm) {
}
}
-void extract_completion_file_info(VBOX_VM& vm, unsigned long& exit_code, string& message) {
- char path[MAXPATHLEN];
- char buf[1024];
-
- exit_code = 0;
- message = "";
-
- sprintf(path, "shared/%s", vm.completion_trigger_file.c_str());
- FILE* f = fopen(path, "r");
- if (f) {
- if (fgets(buf, 1024, f) != NULL) {
- exit_code = atoi(buf);
- }
- while (fgets(buf, 1024, f) != NULL) {
- message += buf;
- }
- fclose(f);
- }
-}
-
// check for trickle trigger files, and send trickles if find them.
//
void VBOX_VM::check_trickle_triggers() {
@@ -1066,7 +1068,7 @@ int main(int argc, char** argv) {
"%s VM Completion File Detected.\n",
vboxwrapper_msg_prefix(buf, sizeof(buf))
);
- extract_completion_file_info(vm, vm_exit_code, message);
+ read_completion_file_info(vm_exit_code, message, vm);
boinc_finish(vm_exit_code);
}
if (!vm.online) {
diff --git a/version.h b/version.h
index 4ade541342..f34b189ab4 100644
--- a/version.h
+++ b/version.h
@@ -16,7 +16,7 @@
#define WRAPPER_RELEASE 26011
/* Release part of vboxwrapper version number */
-#define VBOXWRAPPER_RELEASE 26106
+#define VBOXWRAPPER_RELEASE 26107
/* String representation of BOINC version number */
#define BOINC_VERSION_STRING "7.5.0"
diff --git a/win_build/vboxwrapper.vcxproj b/win_build/vboxwrapper.vcxproj
index f8318124b8..69e3e786a0 100644
--- a/win_build/vboxwrapper.vcxproj
+++ b/win_build/vboxwrapper.vcxproj
@@ -129,12 +129,12 @@
libcmt.lib;libcpmt.lib;kernel32.lib;user32.lib;gdi32.lib;ole32.lib;wsock32.lib;psapi.lib;%(AdditionalDependencies)
- .\Build\$(Platform)\$(Configuration)\vboxwrapper_26106_windows_intelx86.exe
+ .\Build\$(Platform)\$(Configuration)\vboxwrapper_26107_windows_intelx86.exe
true
true
%(DelayLoadDLLs)
true
- .\Build\$(Platform)\$(Configuration)\vboxwrapper_26106_windows_intelx86.pdb
+ .\Build\$(Platform)\$(Configuration)\vboxwrapper_26107_windows_intelx86.pdb
Windows
MachineX86
@@ -179,12 +179,12 @@
libcmt.lib;libcpmt.lib;kernel32.lib;user32.lib;gdi32.lib;ole32.lib;wsock32.lib;psapi.lib;%(AdditionalDependencies)
- .\Build\$(Platform)\$(Configuration)\vboxwrapper_26106_windows_x86_64.exe
+ .\Build\$(Platform)\$(Configuration)\vboxwrapper_26107_windows_x86_64.exe
true
true
%(DelayLoadDLLs)
true
- .\Build\$(Platform)\$(Configuration)\vboxwrapper_26106_windows_x86_64.pdb
+ .\Build\$(Platform)\$(Configuration)\vboxwrapper_26107_windows_x86_64.pdb
Windows
MachineX64