From 37db65907ca8c5318ef0f1f153cf8b618c2439d7 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Fri, 20 Sep 2013 11:18:41 -0400 Subject: [PATCH] VBOX: Base the VM name on the MD5 hash of the result name instead of the slot id. --- samples/vboxwrapper/vboxwrapper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/vboxwrapper/vboxwrapper.cpp b/samples/vboxwrapper/vboxwrapper.cpp index 890a67e9e3..d4dcef6262 100644 --- a/samples/vboxwrapper/vboxwrapper.cpp +++ b/samples/vboxwrapper/vboxwrapper.cpp @@ -64,6 +64,7 @@ #include "boinc_api.h" #include "diagnostics.h" #include "filesys.h" +#include "md5_file.h" #include "parse.h" #include "str_util.h" #include "str_replace.h" @@ -585,8 +586,7 @@ int main(int argc, char** argv) { vm.floppy_image_filename = buf; } } else { - sprintf(buf, "_slot_%d", aid.slot); - vm.vm_master_name += buf; + vm.vm_master_name += md5_string(std::string(aid.result_name)).substr(0, 16); vm.vm_master_description = aid.result_name; if (vm.enable_floppyio) { sprintf(buf, "%s_%d.%s", FLOPPY_IMAGE_FILENAME, aid.slot, FLOPPY_IMAGE_FILENAME_EXTENSION);