Commit Graph

50 Commits

Author SHA1 Message Date
David Anderson 219a540550 client: get rid of the use of memset() to initialize structs to zero.
Instead: declare a static const instance (whose data members are zero)
and copy that.
This avoid the error-prone need to assign each member,
and it works even if there are virtual function tables.
2019-11-05 00:16:02 -08:00
Charlie Fenton b1e629a5fb Move network_test_url tag from cc_config.xml into new nvc_config.xml file, since WCG modifies this for their branded builds (along with new version check info) and it is probably never modified for standard (unbranded) BOINC 2018-07-18 19:10:30 -07:00
David Anderson 1e2fcb4b68 client/lib: change CONFIG to CC_CONFIG, config to cc_config.
Eliminates ambiguity of "config" global var, which is used in server code.
This confuses IDEs that are looking at all the code at once.
2014-05-08 00:51:18 -07:00
David Anderson 9481e04e7b - client: there were many places in the code where we keep track
(usually in a static variable called "last_time")
    of the last time we did something,
    and we only do it again when now - last_time exceeds some interval.
    Example: sending heartbeat messages to apps.
    Problem: if the system clock is decreased by X,
    we won't do any of these actions are time X,
    making it appear that the client is frozen.
    Solution: when we detect that the system clock has decreased,
    set a global var "clock_change" for 1 iteration of the polling loop,
    and disable these time checks if clock_change is set.
2013-03-22 10:28:20 +01:00
David Anderson bbfbef0fe8 - client: code cleanup. Move RESULT and PROJECT to separate files
svn path=/trunk/boinc/; revision=25621
2012-04-30 21:00:28 +00:00
David Anderson c05444ad1e - GUI RPC: switching to the new XML parser
(which won't parse a double as an int)
    revealed a type mismatch in FILE_TRANSFER::next_request_time
    between client and server.


svn path=/trunk/boinc/; revision=25125
2012-01-23 05:03:52 +00:00
David Anderson 5e671e4230 - client: on network_available() GUI RPC,
clear project-level upload and download backoffs,
    as well as RPC and individual xfer backoffs.
    This was an oversight.


svn path=/trunk/boinc/; revision=24621
2011-11-20 09:18:12 +00:00
David Anderson 56492aaeac - client: fix bug in writing daily xfer history file
svn path=/trunk/boinc/; revision=24341
2011-10-06 17:39:13 +00:00
David Anderson 115ca46730 - GUI RPC: add get_daily_xfer_history() RPC for getting
the daily records of #bytes uploaded and downloaded


svn path=/trunk/boinc/; revision=24340
2011-10-06 17:23:16 +00:00
David Anderson 2c72e9c5cc - client: more XML parsing stuff
svn path=/trunk/boinc/; revision=23993
2011-08-11 17:41:48 +00:00
David Anderson c5c5975b44 - Improve interface of XML_PARSER.
Add parsed_tag and is_tag to the class,
    so that parsing functions don't need to declare them
    and pass them around.
- Complete the task of using XML_PARSER as the argument
    to all parsing functions.
    (Internally, many of these functions still use the old XML parser;
    that's the next step.)


svn path=/trunk/boinc/; revision=23978
2011-08-10 17:11:08 +00:00
David Anderson 609d5665cc - client: pass XML_PARSER& rather than MIOFILE& to parse functions.
Preparatory to using new-style XML parsing everywhere.


svn path=/trunk/boinc/; revision=23975
2011-08-09 21:44:14 +00:00
David Anderson 94e8c48220 - client: change --detach_phase_two (??) to --detach_console
- eliminate compiler warnings (e.g. shadowed vars)
    in various places, mostly in client


svn path=/trunk/boinc/; revision=23710
2011-06-12 20:58:43 +00:00
David Anderson 53a514bb1a - client: when detach project, remove its RSS feeds from list
- client: remove once-per-week limit for client-generated notices;
        need to show "network connection required" more often
    - client: when remove "network conn required" notice
        (because now have conn)
        set the flag that says complete notice list is being sent
    - client: if RSS feed fetch returns <error_num>,
        show the corresponding message rather than "XML parse error"

svn path=/trunk/boinc/; revision=23063
2011-02-18 02:00:02 +00:00
David Anderson 6784283211 - user web: fix bugs in server status page
- fix some indentation


svn path=/trunk/boinc/; revision=22890
2011-01-06 23:09:13 +00:00
David Anderson 4edfe2ec28 - client: small initial checkin for new scheduling system.
Keep track of per-project recent estimated credit

svn path=/trunk/boinc/; revision=22608
2010-10-29 23:41:34 +00:00
Rom Walton 4793196725 - client: Fix autoproxy detection so that it doesn't break platforms that
currently do not support proxy detection.
        
    client/
        net_stats.cpp
        sysmon_win.cpp
    lib/
        proxy_info.cpp, .h

svn path=/trunk/boinc/; revision=22110
2010-08-03 16:57:18 +00:00
David Anderson 8677a50473 svn path=/trunk/boinc/; revision=22102 2010-08-03 03:56:13 +00:00
Rom Walton f5260dff06 Quick Updates
svn path=/trunk/boinc/; revision=22101
2010-08-03 03:37:23 +00:00
Rom Walton 4de59ea486 - client: wait until after the proxy check completes before attempting to
check on the reference site.
        
    client/
        net_status.cpp

svn path=/trunk/boinc/; revision=22097
2010-08-02 19:34:24 +00:00
Rom Walton a70b54953d - client: Kick off an auto proxy detection pass on any http error, only
attempt a follow-up reference site check if the proxy server name
        changes. This may mean that'll it will be the second or third connection
        attempt before the CC starts using the new proxy information.
        
    client/
        net_stats.cpp
        sysmon_win.cpp

svn path=/trunk/boinc/; revision=22081
2010-07-30 20:51:08 +00:00
David Anderson 9510005e2f - client: the client shouldn't check for a physical connection
(contacting google.com and possibly alerting the user)
    for "background" HTTP ops.  These include:
    - periodic account manager requests
    - periodic notice RSS feed fetches
    - periodic fetch of project list
    - periodic fetch of current client version


svn path=/trunk/boinc/; revision=22037
2010-07-22 19:13:36 +00:00
David Anderson 28bd0f452c - client: fix notice ordering bug
- client: if don't need network connection,
		remove "need network connection" notices

svn path=/trunk/boinc/; revision=21773
2010-06-18 17:09:18 +00:00
David Anderson 15047b1e4d - client: make all MSG_USER_ALERT messages (i.e., those shown as notices)
translatable (and change some MSG_USER_ALERT messages to MSG_INFO).

svn path=/trunk/boinc/; revision=21709
2010-06-08 23:37:44 +00:00
Rom Walton 9cb3e6ffc7 - client & lib: bring header inclusion up-to-date for the CC to begin
hunting down a memory leak.
        
    client/
        <Various Files>
    lib/
        <Various Files>

svn path=/trunk/boinc/; revision=21457
2010-05-11 19:10:29 +00:00
David Anderson a4de51d667 - client: fix time-zone offset in net BW quota
svn path=/trunk/boinc/; revision=21421
2010-05-08 19:20:57 +00:00
Rom Walton 4e33923657 - client: fix build break
client/
        net_stats.cpp

svn path=/trunk/boinc/; revision=21370
2010-05-03 19:21:39 +00:00
David Anderson 6fbfee024b - client: day boundary for "transfer at most X in N days"
is midnight local time, not UTC
- update translation templates

svn path=/trunk/boinc/; revision=21362
2010-05-03 17:20:44 +00:00
David Anderson 7db608660f - client: standardize debug messages.
Messages enabled by <foo_debug> are prefixed by "[foo]"


svn path=/trunk/boinc/; revision=21335
2010-04-29 20:32:51 +00:00
David Anderson 2a39bf3da0 - client: network bandwidth total was counting 1 day too many
- client simulator: start GPU support

svn path=/trunk/boinc/; revision=21311
2010-04-28 16:22:06 +00:00
David Anderson 9f9d98fff1 - client: write daily net history on shutdown
- client: remove extraneous calls to calShutdown()
    in ATIs available-RAM code.


svn path=/trunk/boinc/; revision=21304
2010-04-27 17:54:29 +00:00
David Anderson d0691236b9 - client: report daily xfer stats in scheduler request
(not used by scheduler, but maybe later)


svn path=/trunk/boinc/; revision=21273
2010-04-24 03:18:24 +00:00
David Anderson 2ab7dbfc65 - client: bug fixes for the above
svn path=/trunk/boinc/; revision=21243
2010-04-22 02:57:50 +00:00
David Anderson 87c84afe0a - client: add preference for limiting network xfers in last N days
(no GUI yet)

svn path=/trunk/boinc/; revision=21242
2010-04-21 23:17:12 +00:00
David Anderson 968c8a78e1 - client: bug fixes for the above
svn path=/trunk/boinc/; revision=21240
2010-04-21 22:51:05 +00:00
David Anderson 15f0b193e9 - client: keep track of daily history of network transfers
svn path=/trunk/boinc/; revision=21238
2010-04-21 22:05:55 +00:00
Rom Walton e14e1cad34 - Remove BOINC_RCSID tags from source files, we are doing branching and tagging
properly.
        
    <Various Files>

svn path=/trunk/boinc/; revision=20873
2010-03-12 16:51:57 +00:00
David Anderson 735e2b0448 - internal change: rename MSG_USER_ERROR to MSG_USER_ALERT
svn path=/trunk/boinc/; revision=20027
2009-12-23 18:02:40 +00:00
David Anderson 62ece8f222 - client: intermediate checkin for RSS/notice stuff.
It's coming along.

svn path=/trunk/boinc/; revision=20006
2009-12-22 03:56:24 +00:00
David Anderson 4bd0e4a2de - client: sort out proxy_info mess.
Source of proxy info (descending priority)
    - GUI RPC (Manager or boinccmd)
        This and only this is saved in state file.
        If neither HTTP nor SOCKS server name present,
        this is viewed as not present
    - environment vars
    - cc_config.xml

    Show sources of proxy info in message log.
    If one is present but overridden, show a message to that effect.

    This fixes a bug where someone had a proxy info env var and
    forgot about it.
    They got an erroneous message saying no proxy was being used.

svn path=/trunk/boinc/; revision=19785
2009-12-05 00:51:05 +00:00
Rom Walton ea0ab71e45 - client: autoproxy detection should happen at startup too.
- client: when autoproxy detection is in progress don't attempt to use
        old values
    - client: user defined proxies should take presidence over automatically
        detected ones.
    - lib: Re-implement the assignment operator for proxy_info, http_curl.cpp
        uses it to clone the proxy information for each http op.  See set_proxy();

    client/
        client_state.cpp
        http_curl.cpp
        net_stats.cpp
    lib/
        proxy_info.cpp, .h

svn path=/trunk/boinc/; revision=18971
2009-09-01 16:01:30 +00:00
David Anderson 607119dcbf - fixes to proxy autodetect
svn path=/trunk/boinc/; revision=18941
2009-08-28 21:25:13 +00:00
David Anderson 8728c04983 - reverted changes to PROXY_INFO which broke various things
svn path=/trunk/boinc/; revision=18936
2009-08-28 17:14:37 +00:00
Rom Walton 16156838c5 - client: Second pass through the automatic proxy detection code.
During the first pass we learned that the whole process of
        proxy detection on Win XP machines could take a few seconds
        even with no proxies to be detected, now the proxy detection
        code is executed in the same thread that is monitoring for
        power change events.
        
    client/
        cs_cmdline.cpp
        http_curl.cpp
        http_curl.h
        http_curl_win.h
        net_stats.cpp
        sysmon_win.cpp, .h
    lib/
        parse.cpp, .h
        proxy_info.cpp, .h

svn path=/trunk/boinc/; revision=18819
2009-08-07 18:16:21 +00:00
Rom Walton b932711a80 - client: refactor the CC startup process, move majority of the
windows code into sysmon_win.cpp, .h
        
    client/
        client_state.cpp, .h
        cpp.h
        http_curl.cpp
        main.cpp, .h
        net_stats.cpp
        sysmon_win.cpp, .h

svn path=/trunk/boinc/; revision=18803
2009-08-03 20:55:00 +00:00
David Anderson 2c03cb2732 - client: if an HTTP op fails within 30 sec of client startup,
don't skip the reference site check.
    Instead, defer the reference site check until 30 secs after startup.
    Also, if during this interval (when the check has been requested
    but not started) return net status as LOOKUP_PENDING

svn path=/trunk/boinc/; revision=18760
2009-07-28 22:24:14 +00:00
Rom Walton c3dc333f26 - client: There was already a way to check if the reference site
check was in progress, I missed it through my first pass
        through the manager code while trying to debug the proxy problem
        get_cc_config returns NETWORK_STATUS_LOOKUP_PENDING which
        then causes the manager to call get_cc_status again.
        
    client/
        gui_rpc_server_ops.cpp
        net_stats.cpp, .h

svn path=/trunk/boinc/; revision=18743
2009-07-28 04:16:32 +00:00
David Anderson 0f0a29b5b7 - client: in get_project_config_poll() GUI RPC,
return ERR_IN_PROGRESS is the reference site check is in progress.
    This hopefully fixes a bug where:
    - the user is connected via a proxy
    - the manager is run for the first time, and an attach is tried
    - the get_project_config.php fetch fails because no proxy config
    - the manager gets the CC_STATUS before the ref site check has
        finished, so it thinks there's a network connection,
        and it doesn't ask the user for proxy info

svn path=/trunk/boinc/; revision=18712
2009-07-24 19:09:37 +00:00
David Anderson 20d9f92a65 - client: new config flags
<network_test_url>: where to go to see if network is up
    <client_version_check_url>: where to get list of client versions
    <client_download_url>: where to direct user to get new version
- manager: some different text for WCG version


svn path=/trunk/boinc/; revision=16208
2008-10-14 23:07:40 +00:00
David Anderson 98cfb8d3b0 - rename .C files to .cpp so that Doxygen will work
svn path=/trunk/boinc/; revision=16069
2008-09-26 18:20:24 +00:00