From f1981368f808a0c3f91e65b8b94b74263ddc9a2b Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Tue, 1 Jul 2014 15:19:17 -0400 Subject: [PATCH] VBOX: Partial commit for completion trigger files (David taking over) --- samples/vboxwrapper/vbox.h | 1 + samples/vboxwrapper/vboxwrapper.cpp | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/samples/vboxwrapper/vbox.h b/samples/vboxwrapper/vbox.h index 3028bb4330..cda2af3c9a 100644 --- a/samples/vboxwrapper/vbox.h +++ b/samples/vboxwrapper/vbox.h @@ -141,6 +141,7 @@ public: // minimum time between checkpoints std::vector copy_to_shared; std::vector trickle_trigger_files; + std::vector completion_trigger_files; /////////// END VBOX_JOB.XML ITEMS ////////////// diff --git a/samples/vboxwrapper/vboxwrapper.cpp b/samples/vboxwrapper/vboxwrapper.cpp index 6fbaa10afc..3183eb28c8 100644 --- a/samples/vboxwrapper/vboxwrapper.cpp +++ b/samples/vboxwrapper/vboxwrapper.cpp @@ -175,6 +175,10 @@ int parse_job_file(VBOX_VM& vm) { vm.trickle_trigger_files.push_back(str); continue; } + else if (xp.parse_string("completion_trigger_file", str)) { + vm.completion_trigger_files.push_back(str); + continue; + } fprintf(stderr, "%s parse_job_file(): unexpected tag %s\n", vboxwrapper_msg_prefix(buf, sizeof(buf)), xp.parsed_tag ); @@ -397,6 +401,27 @@ void VBOX_VM::check_trickle_triggers() { } } +// check for trickle trigger files, and send trickles if find them. +// +void VBOX_VM::check_trickle_triggers() { + char filename[256], path[MAXPATHLEN], buf[256]; + for (unsigned int i=0; i(text.c_str())); + boinc_delete_file(path); + } +} + int main(int argc, char** argv) { int retval; int loop_iteration = 0;