- on startup, look for and parse a file containing the installer filename,
which encodes a project ID and login token.
- look up the project ID in the all-projects list
- do an RPC to that project, mapping the login token to weak auth
- attach to that project using weak auth
stdout is set to line buffered mode but MSVCRT doesn't support
this mode and uses fully buffered mode instead. MinGW uses MSVCRT
but the code doesn't take this into account and as a result
stdoutdae.txt is written BUFSIZ (typically 512) bytes at a time
on MinGW builds.
Correct this by flushing stdout after every message regardless
of which Windows compiler is used.
Fixes#2141.
when handling an AM repy:
- check URL signature only for projects being attached.
- clear dont_request_more_work, detach_when_done if not present in reply
Store disk usage and share in state file; report to AM
A result with a lot of failed uploads could overflow a 4K buffer.
Change report_result_error() so you just pass it the error message,
rather than va_args nonsense.
Better for the debug version to do the same thing as release.
There's a #define you can change if you want GPU detection to happen in the main process.
- use std::string instead of malloced array for ACCT_MGR_OP::global_prefs_xml
- use copy_element_contents() instead of dup_element_contents()
to get global prefs.
The latter uses fgets instead of fgetc,
so it requires that close tag be on a line by itself.
TODO: don't use fgets anywhere in XML parsing.
- fix a bug in copy_element_contents() where it consumes an extra character
- This adds overhead to the get_state() call,
but this happens only once per minute with the Manager.
- rename things so that "keyword_ids" refers to lists of keyword IDs
and "keywords" refers to full KEYWORD objects
- have boinccmd include keywords in workunit properties
The client flushes stdout and stderr at every iteration of the main loop. On Windows, stderr is opened in commit mode and this results in a write to NTFS $Log every time the stream is flushed even if nothing was written to the stream since last flush. These unnecessary writes totals to several hundred megabytes per day. Some users are concerned that this shortens the lifespan of their hardware.
Fix this by removing the flushes from main loop. stderr is unbuffered so it never needed the flush. After freopen() in diagnostics_init() stdout is fully buffered. Change stdout to line buffered mode so that log messages are visible in log files immediately.
MSVCRT doesn't support line buffered streams. It treats them as fully buffered. Emulate line buffered stream by flushing stdout in logging functions when compiling with Visual C++.
new keyword model:
- keywords as identified by integer IDs
- instead of being treated as opaque data,
the keyword XML is now parsed by the client.
This is a first step: pass keywords from AM to client to scheduler,
so that they can be used in job filtering.
Displaying keywords in the client will come later.
- If using an AM, show its name on startup
- accept either <error> or <error_msg> in AM reply; document
- If using an AM and get a request to contact a different AM,
return "detach first" error (relevant if using boinccmd)
- Add mechanism for AM to send opaque data to schedulers