- VBOX: Add User ID and Host ID to the CERN data format.

samples/vboxwrapper
        vboxwrapper.cpp

svn path=/trunk/boinc/; revision=25068
This commit is contained in:
Rom Walton 2012-01-15 07:08:27 +00:00
parent 0c33c456ec
commit 346eff699c
2 changed files with 14 additions and 3 deletions

View File

@ -560,4 +560,10 @@ Rom 14 Jan 2012
samples/vboxwrapper samples/vboxwrapper
vbox.cpp, .h vbox.cpp, .h
vboxwrapper.cpp, vboxwrapper.cpp
Rom 15 Jan 2012
- VBOX: Add User ID and Host ID to the CERN data format.
samples/vboxwrapper
vboxwrapper.cpp

View File

@ -197,14 +197,19 @@ void set_floppy_image(APP_INIT_DATA& aid, VBOX_VM& vm) {
// Use %.17g to represent doubles // Use %.17g to represent doubles
// //
scratch = "BOINC_USERNAME=" + std::string(aid.user_name) + "\n"; scratch = "BOINC_USERNAME=" + std::string(aid.user_name) + "\n";
scratch += "BOINC_AUTHENTICATOR=" + std::string(aid.authenticator) + "\n";
sprintf(buf, "%d", aid.userid);
scratch += "BOINC_USERID=" + std::string(buf) + "\n";
sprintf(buf, "%d", aid.hostid);
scratch += "BOINC_HOSTID=" + std::string(buf) + "\n";
sprintf(buf, "%.17g", aid.user_total_credit); sprintf(buf, "%.17g", aid.user_total_credit);
scratch += "BOINC_USER_TOTAL_CREDIT=" + std::string(buf) + "\n"; scratch += "BOINC_USER_TOTAL_CREDIT=" + std::string(buf) + "\n";
sprintf(buf, "%.17g", aid.host_total_credit); sprintf(buf, "%.17g", aid.host_total_credit);
scratch += "BOINC_HOST_TOTAL_CREDIT=" + std::string(buf) + "\n"; scratch += "BOINC_HOST_TOTAL_CREDIT=" + std::string(buf) + "\n";
scratch += "BOINC_AUTHENTICATOR=" + std::string(aid.authenticator) + "\n";
} }
vm.write_floppy(scratch); vm.write_floppy(scratch);
} }