Commit Graph

75 Commits

Author SHA1 Message Date
David Anderson 31a95ba10f client: add option to use SOCKS5 for DNS
Added <socks5_remote_dns> option to cc_config.xml.
Tells Curl to use the SOCKS proxy for domain name resolution.
2017-01-05 21:34:34 -08:00
Rom Walton 2cc9a0b6c4 client: Cleanup low hanging fruit with regards to cleaning up sprintf.
Use snprintf instead.
2016-02-18 00:59:13 -05:00
Rom Walton 59b5bf2f71 client: Cleanup low hanging fruit with regards to cleaning up strcpy and strcat use.
Use safe_strcpy and safe_strcat when dealing with non-pointer data types.
2016-02-15 23:34:18 -05:00
Rom Walton 56da6b11fb client: Cleanup low hanging fruit with regards to cleaning up strcpy and strcat use.
Use safe_strcpy and safe_strcat when dealing with non-pointer data types.
2016-02-15 21:53:07 -05:00
David Anderson d5f5918111 Replace strncpy() with strlcpy() various places.
Except for very specific cases, strncpy() should never be used.
It can result in a non-terminated string.

Also replace strncat() with strlcat(); the latter is simpler
because you don't have to calculate remaining buffer space.
2016-02-01 20:23:18 -08:00
Christian Beer 4e909c67ef initialize fields in constructors
fixes CID 28033 found by Coverity Scan and cppcheck
2015-10-20 17:16:04 +02:00
David Anderson c15b8d9226 client: include client brand (if any) in HTTP user agent string 2015-04-11 10:52:37 -07:00
David Anderson 7135f46c75 client: if get 417 HTTP status, switch to HTTP 1.0
417 (Expectation Failed) probably means we're talking to a 1.0 proxy
2015-03-05 15:19:41 -08:00
Julien Nabet d75222ebf3 cppcheck: Prefer prefix ++/-- operators for non-primitive types 2015-01-14 21:18:29 +01:00
David Anderson 8710b5e260 scheduler: when parsing trickle-ups, initialize "variety" field to empty
... otherwise can get garbage in that field if request doesn't include variety
2014-07-21 09:42:29 -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 6a8eab73cd replace tab characters with spaces 2014-05-01 21:03:49 -07:00
David Anderson 3752906ba8 client: suppress libcurl inflation of .tgz files
The client tells libcurl not to inflate .gz files;
include .tgz also.
2014-04-30 21:04:57 -07:00
David Anderson 5f7366e19b client: work with old versions of libcurl
With old (7.15) versions of libcurl, args passed to curl_easy_setopt()
(such as the URL) were supposed to remain unchanged until
the operation was done.
Starting with 7.17 it was changed so that curl_easy_setopt()
copied its arguments.
The BOINC client was assuming the latter.
When linked against the former,
URLs would mysteriously change to garbage strings.

I changed things to work with the old libcurl semantics.
2014-03-14 00:21:15 -07:00
David Anderson 32995b78c5 Client: "Accept-Language", not "ACCEPT_LANGUAGE", in HTTP 2014-02-18 00:49:32 -08:00
David Anderson 7455e6b5b7 Client (Android): if no keepalive from GUI, exit rather than suspend
Also: message tweaks
2014-02-17 15:40:58 -08:00
David Anderson 7e3f9d323a Win compile fixes 2014-01-30 23:15:03 -08:00
David Anderson 0276ea6a2a Client: if have a non-English language, set ACCEPT_LANGUAGE in all HTTP requests 2013-12-11 00:35:03 -08:00
David Anderson 846b8c7757 all components: change strcpy() to strlcpy() when possible.
This commit should cover the client and manager code.
2013-06-03 20:24:48 -07:00
David Anderson fdc085264a - client (Win) preallocate large files to avoid file fragmentation
when you write to them incrementally
    (workaround for shoddy filesystem design)
- admin web: remove line that limited mass emails to 10
2013-03-04 15:23:37 +01:00
David Anderson 5b740acee0 - client/manager: move the conditional define of MAXPATHLEN
from boinc_win.h to filesys.h,
	so that the client will hopefully build on Hurd,
	which doesn't define MAXPATHLEN.
2013-03-01 16:17:19 +01:00
David Anderson c8bc624553 - client, Unix: make Curl sockets close-on-exec,
so that app processes don't inherit them.
- client: fix bug that makes client exit if a slot dir contains
    finish file on startup
2013-03-01 16:08:52 +01:00
David Anderson 25c2f6b49c - client: treat all 4xx HTTP errors as permanent
- code cleanup
- API: increase a buffer in timer_handler() from 256 to 512.


svn path=/trunk/boinc/; revision=26012
2012-08-13 18:23:20 +00: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 43278d0f41 - client: fix bug where WCG downloads were getting wrong size errors.
To be honest, I don't know that the problem was or why my change fixed it.

svn path=/trunk/boinc/; revision=25279
2012-02-17 08:55:45 +00:00
David Anderson e268b81a3d - async file stuff. mostly working. still a few bugs
svn path=/trunk/boinc/; revision=25214
2012-02-07 17:54:09 +00:00
David Anderson 739f40c4f7 - client: HTTP range request errors are permanent.
svn path=/trunk/boinc/; revision=25213
2012-02-07 07:58:08 +00:00
Rom Walton b72c5d1310 - client: Undo my change of 24 Jan 2012 which broke WCG's use of the
.gzb file extension.  I was wrong in how I read the conditional and
        it turns out that libcurl does not honor the content-encoding even
        if it is capable of supporting it.  My bad.

    client/
        http_curl.cpp

svn path=/trunk/boinc/; revision=25205
2012-02-06 18:41:17 +00:00
Rom Walton dc11b06ff6 - client: Fix long standing issue with the .gz extension automatically being
decompressed on-the-fly when it wasn't supposed to be.

    client/
        http_curl.cpp

svn path=/trunk/boinc/; revision=25144
2012-01-25 00:00:30 +00:00
Rom Walton 37fa2267c1 - client: undo my previous commit. We request .gz from the server and write
the contents to a .gzt file.
 
    client/
        http_curl.cpp

svn path=/trunk/boinc/; revision=25142
2012-01-24 22:12:30 +00:00
Rom Walton 188e792365 - client: treat the gzt file extension like we do for the gz file extension.
Disable libcurls ability to decompress on-the-fly and let the CC decompress
        it after it has been fully downloaded.
        
    client/
        http_curl.cpp

svn path=/trunk/boinc/; revision=25138
2012-01-24 16:29:28 +00:00
Rom Walton c7233c9a00 - client - Remove Mac OSX 10.3.9 hack, it is no longer needed.
client/
        http_curl.cpp

svn path=/trunk/boinc/; revision=25130
2012-01-23 19:32:24 +00:00
David Anderson b16ccf18fc svn path=/trunk/boinc/; revision=24411 2011-10-18 04:41:13 +00:00
David Anderson 54311606e3 - client: associate a PROJECT with HTTP_OP where applicable,
so that if you use <http_debug> and filter by project
    you don't see other projects' HTTP stuff
- client simulator: cc_config.xml is part of the scenario;
    log flags are part of the simulation


svn path=/trunk/boinc/; revision=24410
2011-10-18 04:23:03 +00:00
David Anderson e279b59913 - Updates Linux notifications to use current libnotify.
- Fix build problems on Mac OS X using autotools
- Consistently use #if HAVE_X for platform checks,
    rather than #ifdef HAVE_X or #if defined(HAVE_X)
- In Unix build, make lots of compiler checks standard
- Fix some compile warnings

From Matt Arsenault.

Note: there are now lots of compile warnings in clientgui/ on Unix,
    mostly in WxWidgets code


svn path=/trunk/boinc/; revision=24303
2011-09-27 19:45:27 +00:00
David Anderson 96feb0014c - client: replicated trickles. Seems to be working now.
- client: added <trickle_debug> config option

svn path=/trunk/boinc/; revision=24265
2011-09-22 18:52:21 +00:00
David Anderson 3a7def077a - client: more stuff for replicated trickle ups
svn path=/trunk/boinc/; revision=24255
2011-09-22 05:39:42 +00:00
David Anderson 9d2d540267 - client: intermediate checkin for replicated trickle-ups.
Not finished yet.
- example app: add --trickle_up and --trickle_down options,
    for testing trickle messages


svn path=/trunk/boinc/; revision=24245
2011-09-20 18:49:38 +00:00
David Anderson 1c039bab77 - client: curl_easy_escape() escapes way too much. Just escape spaces.
svn path=/trunk/boinc/; revision=24205
2011-09-14 06:45:04 +00:00
David Anderson 11a5372961 - client: escape URLs for curl, otherwise filenames with spaces don't work
svn path=/trunk/boinc/; revision=24204
2011-09-14 05:44:09 +00:00
Charlie Fenton 7522d192b8 Mac: Update to libcurl 7.21.7 and c-ares 1.7.4
svn path=/trunk/boinc/; revision=23798
2011-07-06 11:02:50 +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 7075ce8285 - client: add <http_transfer_timeout_bps> config option.
Defines the transfer rate below which the connection
    is considered idle, and timeout starts


svn path=/trunk/boinc/; revision=23514
2011-05-07 17:56:13 +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 a7376343cf - client: fix a bug that caused GPU apps to fail on startup
in the following situation.
    Suppose GPU job A is running,
    and GPU job B (which has never run before) preempts it.
    Then
    1) an ACTIVE_TASK and slot dir are allocated for B (slot dir is empty)
    2) A is told to quit; B isn't started until A exits
        (because they're GPU jobs)
    3) before A exits, B is suspended
    4) eventually B is started.
        Its scheduler state is SUSPENDED rather than UNINITIALIZED,
        so the scheduler thinks it slot dir has already been populated.
        But it hasn't, and when the app starts it fails immediately
        because no files are there.

    Fix: decide whether a slot dir needs to be populated by
    seeing whether it's empty,
    rather than looking at the scheduler state of the task.


svn path=/trunk/boinc/; revision=22206
2010-08-11 23:03:09 +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 61aee059bc - client: call curl_global_cleanup() on exit
svn path=/trunk/boinc/; revision=21751
2010-06-15 19:01:56 +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 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 15f0b193e9 - client: keep track of daily history of network transfers
svn path=/trunk/boinc/; revision=21238
2010-04-21 22:05:55 +00:00