*** empty log message ***

svn path=/trunk/boinc/; revision=7476
This commit is contained in:
Rom Walton 2005-08-24 20:41:25 +00:00
parent e873186d2b
commit 88aa3084d0
1 changed files with 11 additions and 7 deletions

View File

@ -316,7 +316,13 @@ void NET_XFER_SET::got_select(FDSET_GROUP&, double timeout) {
// need to translate between the curl error codes and the equiv.
// BOINC error codes here.
nxf->http_op_retval = HTTP_STATUS_INTERNAL_SERVER_ERROR;
if (nxf->CurlResult == CURLE_OUT_OF_MEMORY) {
if (nxf->CurlResult == CURLE_OK) {
if ((nxf->response/100)*100 != HTTP_STATUS_OK) {
nxf->http_op_retval = nxf->response;
} else {
nxf->http_op_retval = nxf->response - 200;
}
} else if (nxf->CurlResult == CURLE_OUT_OF_MEMORY) {
msg_printf(0, MSG_ERROR, "An out of memory condition has been detected");
nxf->http_op_retval = ERR_MALLOC;
} else if (nxf->CurlResult == CURLE_COULDNT_RESOLVE_HOST) {
@ -335,19 +341,17 @@ void NET_XFER_SET::got_select(FDSET_GROUP&, double timeout) {
msg_printf(0, MSG_ERROR, "Attempting to communicate with [%s] timed out", nxf->hostname);
nxf->http_op_retval = ERR_TIMEOUT;
} else if (nxf->CurlResult == CURLE_READ_ERROR) {
msg_printf(0, MSG_ERROR, "Attempting to read a file failed [%s]", nxf->strCurlResult);
nxf->http_op_retval = ERR_FREAD;
} else if (nxf->CurlResult == CURLE_WRITE_ERROR) {
msg_printf(0, MSG_ERROR, "Attempting to write to a file failed [%s]", nxf->strCurlResult);
nxf->http_op_retval = ERR_FWRITE;
} else if (nxf->CurlResult == CURLE_RECV_ERROR) {
msg_printf(0, MSG_ERROR, "Attempting to receive data from [%s] failed [%s]", nxf->hostname, nxf->strCurlResult);
nxf->http_op_retval = ERR_READ;
} else if (nxf->CurlResult == CURLE_SEND_ERROR) {
msg_printf(0, MSG_ERROR, "Attempting to send data to [%s] failed [%s]", nxf->hostname, nxf->strCurlResult);
nxf->http_op_retval = ERR_WRITE;
} else if (nxf->CurlResult == CURLE_OK) {
if ((nxf->response/100)*100 != HTTP_STATUS_OK) {
nxf->http_op_retval = nxf->response;
} else {
nxf->http_op_retval = nxf->response - 200;
}
}
if (!nxf->http_op_retval && nxf->http_op_type == HTTP_OP_POST2) {