*** empty log message ***

svn path=/trunk/boinc/; revision=6493
This commit is contained in:
David Anderson 2005-06-29 06:14:35 +00:00
parent dcd6a708e1
commit 114cb732d1
5 changed files with 23 additions and 6 deletions

View File

@ -8755,3 +8755,16 @@ Rom 28 June 2005
clientgui/
MainFrame.cpp
David 28 June 2005
- add ERR_NO_NETWORK_CONNECTION error code.
Return this if can't connect to server because no network connection.
- show boincerror(retval) instead of retval in a couple of messages.
Should do this everywhere.
client/
net_xfer.C
scheduler_op.C
lib/
error_numbers.h
util.C

View File

@ -97,7 +97,7 @@ int NET_XFER::open_server() {
#ifdef _WIN32
if (get_connected_state() == CONNECTED_STATE_NOT_CONNECTED) {
gstate.want_network_flag = true;
return ERR_CONNECT;
return ERR_NO_NETWORK_CONNECTION;
} else {
gstate.want_network_flag = false;
}

View File

@ -140,8 +140,8 @@ int SCHEDULER_OP::init_op_project(PROJECT* p) {
}
if (retval) {
sprintf(err_msg,
"Scheduler request initialization to %s failed, error %d\n",
p->get_scheduler_url(url_index, url_random), retval
"Scheduler request to %s failed: %s\n",
p->get_scheduler_url(url_index, url_random), boincerror(retval)
);
backoff(p, err_msg);
}
@ -248,14 +248,14 @@ int SCHEDULER_OP::start_rpc(PROJECT* p) {
retval = http_op.init_post(scheduler_url, request_file, reply_file);
if (retval) {
msg_printf(p, MSG_ERROR,
"Scheduler request failed init_post(): %d", retval
"Scheduler request failed: %s", boincerror(retval)
);
return retval;
}
retval = http_ops->insert(&http_op);
if (retval) {
msg_printf(p, MSG_ERROR,
"Scheduler request failed HTTP insert: %d", retval
"Scheduler request failed: %s", boincerror(retval)
);
return retval;
}

View File

@ -150,6 +150,7 @@
#define ERR_USER_PERMISSION -201
// e.g. user didn't allow network connection
#define ERR_SHMEM_NAME -202
#define ERR_NO_NETWORK_CONNECTION -203
// PLEASE: add a text description of your error to
// the text description function boincerror() in util.C.

View File

@ -931,8 +931,11 @@ const char* boincerror(int which_error) {
case ERR_WRONG_SIZE: return "wrong size";
case ERR_USER_PERMISSION: return "user permission";
case ERR_SHMEM_NAME: return "can't get shared mem segment name";
case ERR_NO_NETWORK_CONNECTION: return "no available network connection";
}
return "UNRECOGNIZED: make lib/util.C consistent with lib/error_numbers.h";
static char buf[64];
sprintf(buf, "error %d", which_error);
return buf;
}