It turns out we have two different encodings of process priority:
1) specified in cc_config.xml and used by the client: 0 (low) to 4 (high)
2) specified in job.xml and used by the wrapper: 1 (low) to 5 (high).
This didn't cause any problems until recently when I added code
to pass the cc_config.xml info to the wrapper;
it was interpreting it on the 1-5 scale.
Fix: have the wrapper convert it (add one).
Also: I forgot to have the client actually put the priority into
in the app_init_data.xml file.
bool no_priority_change
int process_priority
int process_priority_special
Wrappers should honor these prefs,
but currently they don't have access to them.
Pass them in the APP_INIT_DATA structure.
Modify wrapper.cpp to use these prefs if they exist;
this overrides the priority specified in the job file, if any.
Added new projects to build with Microsoft Visual Studio 2019.
Added vcpkg support for 3rd party libraries.
For simplification all executables use static linked libraries
(impact +0.5 MB or < 3%).
Enable build for all projects (including examples for opencl, cuda etc).
Configuration is not tested yet, so no CI added.
Also because of the reason above projects for VS 2013 are not removed yet too.
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
- change seqno only on authenticated request,
so that bad guys make a bunch of bad calls and lock out actual calls
- Fix %ld format for long
(seqnos are long in case GUI makes > 2B calls)
- Print message if validation fails
- end of HTTP header is marked by \r\n\r\n, not \n\n
Also put some error checking into the client-side Javascript.
E.g. things should still work if password file is absent;
you just can't make RPCs that require authentication.
Much work still to be done here.
No need to pass a member variable to a member function.
Also: fix confused variable names: "current_cpu_time" is just this episode.
"total_cpu_time" is total since start of job.
Also: fix code formatting.
This was complicated by the fact that VBox changed the API a little:
GetChildrenCount() is now get_ChildrenCount(),
and CreateSharedFolder() takes a new AutoMountPoint argument
(where the folder goes in the guest system) which I'm assuming should be /.
I handled these using #ifdefs in vbox_mscom_impl.cpp.