mirror of https://github.com/BOINC/boinc.git
Merge branch 'master' of ssh://boinc.berkeley.edu/boinc-v2
This commit is contained in:
commit
966b5d929c
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -129,12 +129,12 @@
|
|||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>libcmt.lib;libcpmt.lib;kernel32.lib;user32.lib;gdi32.lib;ole32.lib;wsock32.lib;psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>.\Build\$(Platform)\$(Configuration)\vboxwrapper_26106_windows_intelx86.exe</OutputFile>
|
||||
<OutputFile>.\Build\$(Platform)\$(Configuration)\vboxwrapper_26107_windows_intelx86.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
<DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\Build\$(Platform)\$(Configuration)\vboxwrapper_26106_windows_intelx86.pdb</ProgramDatabaseFile>
|
||||
<ProgramDatabaseFile>.\Build\$(Platform)\$(Configuration)\vboxwrapper_26107_windows_intelx86.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
|
@ -179,12 +179,12 @@
|
|||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>libcmt.lib;libcpmt.lib;kernel32.lib;user32.lib;gdi32.lib;ole32.lib;wsock32.lib;psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>.\Build\$(Platform)\$(Configuration)\vboxwrapper_26106_windows_x86_64.exe</OutputFile>
|
||||
<OutputFile>.\Build\$(Platform)\$(Configuration)\vboxwrapper_26107_windows_x86_64.exe</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
<DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>.\Build\$(Platform)\$(Configuration)\vboxwrapper_26106_windows_x86_64.pdb</ProgramDatabaseFile>
|
||||
<ProgramDatabaseFile>.\Build\$(Platform)\$(Configuration)\vboxwrapper_26107_windows_x86_64.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
|
|
Loading…
Reference in New Issue