Commit Graph

5763 Commits

Author SHA1 Message Date
David Anderson f052077621 Client: don't handle GUI RPCs until account token lookup RPC is finished.
Also change filename to "account_data.txt"
2017-11-14 16:10:44 -08:00
Kevin Reed 500790f8c7 Merge branch 'master' into dpa_autologin_client 2017-11-14 09:10:46 -06:00
Charlie Fenton 0a2115cedc client: Mac OpenCL: fix arithmetic overflow in memory size calculation for AMD GPUs 2017-11-10 06:06:56 -08:00
David Anderson a714883096 client: don't print error msg if filename lacks login info 2017-11-10 00:48:01 -08:00
David Anderson a732e8c7db client: delete autologin file if any errors 2017-11-06 20:06:13 -08:00
David Anderson bd5e265534 Manager: don't show Attach Wizard at startup if autologin in progress 2017-11-04 17:02:56 -07:00
David Anderson 5ea79f8be4 client: in parsing installer filename, ignore " (1)" 2017-11-03 23:47:12 -07:00
David Anderson 7a62d8e2de client: autologin: parse user_id from installer filename, pass to RPC 2017-11-03 13:59:53 -07:00
David Anderson b7ad154e33 Add new files 2017-11-02 14:32:59 -07:00
David Anderson 52547cdea7 client: delete installer filename file when done 2017-11-02 14:25:22 -07:00
David Anderson bbc352881b client: add support for streamlined register/download/attach
- 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
2017-11-02 14:08:05 -07:00
Kevin Reed d1e5433e48 Merge pull request #2164 from BOINC/dpa_gui_rpc
client: fix bug in set_app_config GUI RPC
2017-10-11 19:06:01 -05:00
David Anderson 56ec805736 client: fix bug in set_app_config GUI RPC
forgot to fclose().
Also have get_app_config() return error if no file.
Probably should do this for other get-file RPCs as well.
2017-10-08 11:55:58 -07:00
David Anderson ff949771b7 client: fix bug where client does tight loop if no_gui_rpc set
In this case there are no fds in the central select, and it returns immediately.
Fix: if no fds, sleep instead of select.
2017-10-02 13:06:03 -07:00
David Anderson 65869eb4f9 Merge pull request #2128 from BOINC/dpa_am_fixes2
client: extensions, fixes to account manager functionality
2017-09-23 14:28:17 -07:00
Juha Sointusalo 8b960a2a00 client: explicitly flush stdout on all Windows builds
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.
2017-09-23 23:34:35 +03:00
David Anderson 9f5c247adf client: extensions, fixes to account manager functionality
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
2017-09-15 14:42:51 -07:00
David Anderson 89248f56c9 Merge pull request #2074 from BOINC/am_parse_fix
Fix parsing of AM reply messages
2017-08-25 15:35:42 -07:00
David Anderson 2649921232 client: show how many project files are being checked 2017-08-19 19:02:10 -07:00
David Anderson 09d5123c4f client: more startup messages, hopefully find source of delay 2017-08-18 01:35:10 -07:00
David Anderson 8821ff6e8c Merge branch 'master' of github.com:BOINC/boinc 2017-08-18 01:33:46 -07:00
David Anderson 080df0da0a client: fix keyword parse in AM account file 2017-08-18 01:33:16 -07:00
David Anderson c5281d0a4d client: fix keyword parsing 2017-08-16 17:17:51 -07:00
David Anderson d7a38ca6fa Merge pull request #2036 from BOINC/win_exe
Client, Win: append .exe to service process program name if missing
2017-08-15 23:30:55 -07:00
David Anderson 1adb89d838 Merge pull request #2035 from BOINC/coproc_process
client: do coproc detect in a separate process even for debug
2017-08-15 23:30:10 -07:00
David Anderson b355a13f8d client: use snprintf() instead of sprintf() in a few places
... none of which was a possible overrun, but doesn't hurt to check.
2017-08-15 17:06:29 -07:00
David Anderson 8e7857623e client: eliminate possible buffer overflow in reporting result errors
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.
2017-08-15 16:31:33 -07:00
David Anderson 12d13917cd client: hardware client executable name: boinc or boinc.exe
The GPU detection code was already doing this;
do for Win daemon process startup as well.
2017-08-15 15:13:50 -07:00
David Anderson da64baf29d Merge pull request #1895 from AenBleidd/PVS_V814_for_pr
Move 'strlen' function outside of the loop
2017-08-14 17:37:12 -07:00
David Anderson d1561a7402 Merge pull request #1638 from BOINC/fix_c++11_build
Fix c++11 build
2017-08-14 16:56:02 -07:00
David Anderson 7930686128 Client, Win: append .exe to service process program name if missing 2017-08-14 14:57:32 -07:00
David Anderson a3b4191ca9 client: do coproc detect in a separate process even for debug
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.
2017-08-14 14:54:31 -07:00
David Anderson 870d34ad03 Fix parsing of AM reply messages
- 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
2017-08-14 14:46:30 -07:00
David Anderson 5c0c361e98 Merge pull request #1978 from JuhaSointusalo/client-add-task-name-to-postponed-message
client: add task name and tweak postponed message
2017-08-04 15:05:35 -07:00
David Anderson 59716fc84d Merge pull request #1979 from JuhaSointusalo/client-no-flush-in-mainloop
client/lib: don't flush stdout and stderr in main loop
2017-08-04 15:04:48 -07:00
David Anderson d15d0b95de client: parse keyword file and export keywords in get_state() GUI RPC
- 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
2017-07-30 13:12:16 -07:00
David Anderson 85d1c0fc63 client: parse job keywords from scheduler and save in state file 2017-07-29 14:51:39 -07:00
David Anderson 6fc116012b client: code cleanup, no functional change 2017-07-22 00:15:40 -07:00
Juha Sointusalo c050a69888 client: add task name and tweak postponed message
Makes it easier to see which task had problems when reading logs afterwards. Also include back off time in notice and drop fractional seconds.
2017-07-17 22:17:29 +03:00
Juha Sointusalo 6b67fe6152 client/lib: don't flush stdout and stderr in main loop
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++.
2017-07-17 21:58:23 +03:00
David Anderson 5add5fda1d client: update keyword handling
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.
2017-07-15 19:05:23 -07:00
David Anderson b902a3811b client: do AM RPC before detaching detach-when-done projects
This way the AM learns about the last tasks done for those projects
2017-06-16 22:43:16 -07:00
David Anderson 34ccd8b19c client: bug fix in acct mgr logic 2017-06-15 19:30:49 -07:00
David Anderson cd9437b8b1 client: account-manager-related changes
- 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
2017-06-14 22:53:16 -07:00
Charlie Fenton ec7d13f7dc client: fix minor bug 2017-06-07 06:02:04 -07:00
Charlie Fenton 177c0df584 Mac client: avoid a potential compile error if deprecated enum kCGLRPVideoMemory is removed from a future SDK 2017-06-06 05:31:30 -07:00
David Anderson e436be9574 client: show alt platforms in event log at startup. Fixes #1920. 2017-05-18 12:34:41 -07:00
David Anderson b272d1de81 client: fix typo 2017-05-12 16:09:31 -07:00
David Anderson 5b6f648570 client/lib: add GUI RPCs for reading and writing app_config.xml files.
These will allow GUIs (e.g. BoincTasks) to provide dialogs for editing app config info.
2017-05-11 20:16:35 -07:00
David Anderson 4a9cc3e725 client/lib: code shuffle preparatory to adding app_config GUI RPC 2017-05-11 01:53:50 -07:00