From c84e14cc6c6cf38db147e8d7f370a26f5310905a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 19 Jan 2006 01:13:49 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=9267 --- checkin_notes | 10 ++++++++ client/http_curl.h | 20 ++++++++-------- client/pers_file_xfer.C | 1 + doc/graphics.php | 2 +- doc/server_status.php | 53 ----------------------------------------- lib/util.C | 7 +++++- 6 files changed, 28 insertions(+), 65 deletions(-) delete mode 100644 doc/server_status.php diff --git a/checkin_notes b/checkin_notes index 51f0d197e7..b09913e9d3 100755 --- a/checkin_notes +++ b/checkin_notes @@ -607,3 +607,13 @@ David 18 Jan 2006 graphics_api.h lib/ filesys.C,h + +David 18 Jan 2006 + - added HTTP error codes to boincerror(), + since these are sometimes used as return values. + + client/ + http_curl.h + pers_file_xfer.C + lib/ + util.C diff --git a/client/http_curl.h b/client/http_curl.h index afd99b666f..06f1263d27 100644 --- a/client/http_curl.h +++ b/client/http_curl.h @@ -39,16 +39,16 @@ // official HTTP status codes -#define HTTP_STATUS_CONTINUE 100 -#define HTTP_STATUS_OK 200 -#define HTTP_STATUS_PARTIAL_CONTENT 206 -#define HTTP_STATUS_RANGE_REQUEST_ERROR 416 -#define HTTP_STATUS_MOVED_PERM 301 -#define HTTP_STATUS_MOVED_TEMP 302 -#define HTTP_STATUS_NOT_FOUND 404 -#define HTTP_STATUS_PROXY_AUTH_REQ 407 -#define HTTP_STATUS_INTERNAL_SERVER_ERROR 500 -#define HTTP_STATUS_SERVICE_UNAVAILABLE 503 +#define HTTP_STATUS_CONTINUE 100 +#define HTTP_STATUS_OK 200 +#define HTTP_STATUS_PARTIAL_CONTENT 206 +#define HTTP_STATUS_MOVED_PERM 301 +#define HTTP_STATUS_MOVED_TEMP 302 +#define HTTP_STATUS_NOT_FOUND 404 +#define HTTP_STATUS_PROXY_AUTH_REQ 407 +#define HTTP_STATUS_RANGE_REQUEST_ERROR 416 +#define HTTP_STATUS_INTERNAL_SERVER_ERROR 500 +#define HTTP_STATUS_SERVICE_UNAVAILABLE 503 #define HTTP_OP_NONE 0 #define HTTP_OP_GET 1 diff --git a/client/pers_file_xfer.C b/client/pers_file_xfer.C index 4c0ab4c782..90ecb52052 100644 --- a/client/pers_file_xfer.C +++ b/client/pers_file_xfer.C @@ -321,6 +321,7 @@ void PERS_FILE_XFER::handle_xfer_failure() { retry_or_backoff(); } } + // Cycle to the next URL, or if we've hit all URLs in this cycle, // backoff and try again later // diff --git a/doc/graphics.php b/doc/graphics.php index c4b31b0f17..be6aa436a0 100644 --- a/doc/graphics.php +++ b/doc/graphics.php @@ -184,7 +184,7 @@ if the main program handles them, it must convey them to the graphics program.

Programs that use BOINC graphics must supply the following functions:

-    bool app_graphics_render(int xs, ys, double time_of_day);
+    int app_graphics_render(int xs, ys, double time_of_day);
 
This will be called periodically in the graphics thread. It should generate the current graphic. diff --git a/doc/server_status.php b/doc/server_status.php deleted file mode 100644 index 032766a84a..0000000000 --- a/doc/server_status.php +++ /dev/null @@ -1,53 +0,0 @@ -URL/server_status.php. -These are generally updated every 10 minutes or so - -do not poll more often than that. -These can be used to make web sites showing -the server status of multiple BOINC projects. -

-"; -echo html_text(" - - 1128535206 - - - jocelyn - BOINC database - running - - - castelli - master science database - running - - - klaatu - data-driven web pages - disabled - - - galileo - feeder - not running - - - - 614830 - 1208959 - 8 - 2 - 4 - 15 - 0.00083333334 - -"); - -page_tail(); - -?> diff --git a/lib/util.C b/lib/util.C index 74ed1bbdae..7a8d9c4a0b 100755 --- a/lib/util.C +++ b/lib/util.C @@ -948,9 +948,14 @@ const char* boincerror(int which_error) { case ERR_FFLUSH: return "Couldn't flush file"; case ERR_FSYNC: return "Couldn't sync file"; case ERR_TRUNCATE: return "Couldn't truncate file"; + case 404: return "HTTP file not found"; + case 407: return "HTTP proxy authentication failure"; + case 416: return "HTTP range request error"; + case 500: return "HTTP internal server error"; + case 503: return "HTTP service unavailable"; } static char buf[128]; - sprintf(buf, "unknown BOINC error %d. Have BOINC devs fix boincerror()!", which_error); + sprintf(buf, "Error %d", which_error); return buf; }