list of changes:
* api/reduce_lib.cpp:188:10: warning: declaration of 'h' shadows a previous local
* lib/gui_rpc_client_ops.cpp:1479:42: warning: clearing an object of non-trivial type 'struct VERSION_INFO'
* client/boinc_cmd.cpp:434:32: warning: clearing an object of non-trivial type 'class HOST_INFO'
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
On Windows, include boinc_win.h
No references to STDWX_H, STDAFX_H etc.
Note: .cpp files should not have a bunch of gnarly #if logic in their includes.
If such logic is needed, put it in a central place.
In VS2019, making CRT calls like printf after main.cpp() has returned
raises and exception. Don't do this.
Also, there were some runtime warnings from WxWidgets about bad flags
for vertical spacers. Fix these.
This PR lets a project change its URL from http: to https: without user involvement.
But the old URL can be present in various places, leading to errors.
This commit fixes these problem, mostly by using a URL comparison function
(urls_match()) that ignores the protocol prefix,
and by changing lookup_project() to ignore the prefix.
The places are:
- task state files
- account manager replies
- active tasks in state file
- master URLs in command-line args
- master URLs in config file (e.g. GPU exclusion)
- GUI RPCs that specify a project
When looking for gui_rpc_auth.cfg, first look in current dir,
then see if there's a file /etc/boinc-client/config.properties
with a line "data_dir=X". If so, look in X.
Return prescriptive message in case of failure.
boinccmd: use the above, and show the message.
Note: a lot of GUI RPCs don't require the GUI RPC password.
On filesystems that use compression, the disk space allocated to a file
is generally less than the (logical) size of the file.
In this case, the client can fail to get work
because it thinks there's insufficient disk space.
Fix: change things so that the client measures disk usage
(per-project and total) in terms of allocated space rather than file size.
But still use logical file sizes in two places:
- in checking that downloaded files are the right size
- in calculating a job's disk usage to see if it exceeds
the project-specified limit.
New functions: file_size_alloc() and dir_size_alloc().
These are like file_size() and dir_size() except they return
allocated rather than logical size.
pragma warning(default: X) sets the 'X' warning to the DEFAULT state.
Correct way is disable warning for scope and restore it to state
BEFORE the scope when it ends.
See https://www.viva64.com/en/w/v665/print/
Today, it looks like
```
04-Apr-2020 00:33:45 [TN-Grid Platform] Project requested delay of 121 seconds
04-Apr-2020 03:13:20 getaddrinfo(OpenWrt): Name does not resolve04-Apr-2020 03:13:22 [TN-Grid Platform] Project requested delay of 121 seconds
04-Apr-2020 04:36:43 getaddrinfo(OpenWrt): Name does not resolve04-Apr-2020 04:36:45 [TN-Grid Platform] Project requested delay of 121 seconds
04-Apr-2020 06:14:09 getaddrinfo(OpenWrt): Name does not resolve04-Apr-2020 06:14:11 [TN-Grid Platform] Project requested delay of 121 seconds
04-Apr-2020 07:36:18 getaddrinfo(OpenWrt): Name does not resolve04-Apr-2020 07:36:20 [TN-Grid Platform] Project requested delay of 121 seconds
```
which connects two messages that are unrelated - the first being caused by the host or its name server and the second by the project server.
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>
There were two problems:
1) We weren't fetching work unless benchmarks had been run
(since a scheduler request must include a p_fpops value).
Fix: if --skip_cpu_benchmarks set, pretend that we ran benchmarks
and p_fpops is 1 GFLOPS
2) adding a project via the cmdline (--attach_project)
wasn't setting a flag to fetch the project's scheduler list.
Also: the new way of clearing structures (copying a static instance to *this)
causes a startup hang if the default constructor calls clear().
To fix this, have the static instance use a constructor
that doesn't call clear()
Also: fix message about libc version.
"[foobar] ...." means that the message is conditional on <debug_foobar>
PR #3364 changed the way we clear structures.
This introduced a bug: HOST_INFO::clear_host_info()
intentionally didn't clear HOST_INFO::coprocs.
But it was replaced with HOST_INFO::clear(), which did.
This caused the client to lose GPU info.
Fix: restore HOST_INFO::clear_host_info(), and add a comment
to avoid future errors like this.
Also add some comments in GPU detection,
which is woefully lacking in them.