mirror of https://github.com/BOINC/boinc.git
want_network_flag logic
svn path=/trunk/boinc/; revision=9406
This commit is contained in:
parent
85a9549e96
commit
f4b8bc5506
|
@ -1517,3 +1517,12 @@ Charlie 2 Feb 2006
|
|||
app.h
|
||||
app_graphics.C
|
||||
app_start.C
|
||||
|
||||
David 6 Feb 2006
|
||||
- Slight refinement to next-earlier checkin.
|
||||
Set want_network_flag only if the request to the reference network site
|
||||
results in a CURLE_COULDNT_RESOLVE_HOST Curl error code.
|
||||
|
||||
client/
|
||||
acct_setup.C,h
|
||||
gui_http.C,h
|
||||
|
|
|
@ -101,7 +101,7 @@ int GET_PROJECT_CONFIG_OP::do_rpc(string master_url) {
|
|||
return retval;
|
||||
}
|
||||
|
||||
void GET_PROJECT_CONFIG_OP::handle_reply(int http_op_retval) {
|
||||
void GET_PROJECT_CONFIG_OP::handle_reply(int http_op_retval, int) {
|
||||
if (http_op_retval) {
|
||||
error_num = http_op_retval;
|
||||
} else {
|
||||
|
@ -130,7 +130,7 @@ int LOOKUP_ACCOUNT_OP::do_rpc(ACCOUNT_IN& ai) {
|
|||
return retval;
|
||||
}
|
||||
|
||||
void LOOKUP_ACCOUNT_OP::handle_reply(int http_op_retval) {
|
||||
void LOOKUP_ACCOUNT_OP::handle_reply(int http_op_retval, int) {
|
||||
if (http_op_retval) {
|
||||
error_num = http_op_retval;
|
||||
} else {
|
||||
|
@ -159,7 +159,7 @@ int CREATE_ACCOUNT_OP::do_rpc(ACCOUNT_IN& ai) {
|
|||
return retval;
|
||||
}
|
||||
|
||||
void CREATE_ACCOUNT_OP::handle_reply(int http_op_retval) {
|
||||
void CREATE_ACCOUNT_OP::handle_reply(int http_op_retval, int) {
|
||||
if (http_op_retval) {
|
||||
error_num = http_op_retval;
|
||||
} else {
|
||||
|
@ -186,7 +186,7 @@ int LOOKUP_WEBSITE_OP::do_rpc(string& url) {
|
|||
return retval;
|
||||
}
|
||||
|
||||
void LOOKUP_WEBSITE_OP::handle_reply(int http_op_retval) {
|
||||
void LOOKUP_WEBSITE_OP::handle_reply(int http_op_retval, int CurlResult) {
|
||||
error_num = http_op_retval;
|
||||
|
||||
// if we couldn't contact a reference web site,
|
||||
|
@ -194,7 +194,7 @@ void LOOKUP_WEBSITE_OP::handle_reply(int http_op_retval) {
|
|||
// (usually no physical network connection).
|
||||
// Set a flag that will signal the Manager to that effect
|
||||
//
|
||||
if (error_num) {
|
||||
if (CurlResult == CURLE_COULDNT_RESOLVE_HOST) {
|
||||
gstate.want_network_flag = true;
|
||||
}
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ static bool parse_version(FILE* f, char* new_version) {
|
|||
return false;
|
||||
}
|
||||
|
||||
void GET_CURRENT_VERSION_OP::handle_reply(int http_op_retval) {
|
||||
void GET_CURRENT_VERSION_OP::handle_reply(int http_op_retval, int) {
|
||||
char buf[256], new_version[256];
|
||||
if (http_op_retval) {
|
||||
error_num = http_op_retval;
|
||||
|
|
|
@ -56,7 +56,7 @@ struct GET_PROJECT_CONFIG_OP: public GUI_HTTP_OP {
|
|||
|
||||
virtual ~GET_PROJECT_CONFIG_OP(){}
|
||||
int do_rpc(string url);
|
||||
virtual void handle_reply(int http_op_retval);
|
||||
virtual void handle_reply(int http_op_retval, int);
|
||||
GET_PROJECT_CONFIG_OP(){error_num = BOINC_SUCCESS;}
|
||||
};
|
||||
|
||||
|
@ -66,7 +66,7 @@ struct LOOKUP_ACCOUNT_OP: public GUI_HTTP_OP {
|
|||
|
||||
virtual ~LOOKUP_ACCOUNT_OP(){}
|
||||
int do_rpc(ACCOUNT_IN&);
|
||||
virtual void handle_reply(int http_op_retval);
|
||||
virtual void handle_reply(int http_op_retval, int);
|
||||
LOOKUP_ACCOUNT_OP(){error_num = BOINC_SUCCESS;}
|
||||
};
|
||||
|
||||
|
@ -76,7 +76,7 @@ struct CREATE_ACCOUNT_OP: public GUI_HTTP_OP {
|
|||
|
||||
virtual ~CREATE_ACCOUNT_OP(){}
|
||||
int do_rpc(ACCOUNT_IN&);
|
||||
virtual void handle_reply(int http_op_retval);
|
||||
virtual void handle_reply(int http_op_retval, int);
|
||||
CREATE_ACCOUNT_OP(){error_num = BOINC_SUCCESS;}
|
||||
};
|
||||
|
||||
|
@ -85,7 +85,7 @@ struct LOOKUP_WEBSITE_OP: public GUI_HTTP_OP {
|
|||
|
||||
virtual ~LOOKUP_WEBSITE_OP(){}
|
||||
int do_rpc(std::string&);
|
||||
virtual void handle_reply(int http_op_retval);
|
||||
virtual void handle_reply(int http_op_retval, int);
|
||||
LOOKUP_WEBSITE_OP(){error_num = BOINC_SUCCESS;}
|
||||
};
|
||||
|
||||
|
@ -94,7 +94,7 @@ struct GET_CURRENT_VERSION_OP: public GUI_HTTP_OP {
|
|||
|
||||
virtual ~GET_CURRENT_VERSION_OP(){}
|
||||
int do_rpc();
|
||||
virtual void handle_reply(int http_op_retval);
|
||||
virtual void handle_reply(int http_op_retval, int);
|
||||
GET_CURRENT_VERSION_OP(){error_num = BOINC_SUCCESS;}
|
||||
};
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ bool GUI_HTTP::poll() {
|
|||
|
||||
if (http_op.http_op_state == HTTP_STATE_DONE) {
|
||||
gstate.http_ops->remove(&http_op);
|
||||
gui_http_op->handle_reply(http_op.http_op_retval);
|
||||
gui_http_op->handle_reply(http_op.http_op_retval, http_op.CurlResult);
|
||||
gui_http_op = NULL;
|
||||
state = GUI_HTTP_STATE_IDLE;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ using std::string;
|
|||
// base class for various types of ops
|
||||
//
|
||||
struct GUI_HTTP_OP {
|
||||
virtual void handle_reply(int) {}
|
||||
virtual void handle_reply(int, int) {}
|
||||
GUI_HTTP_OP(){}
|
||||
virtual ~GUI_HTTP_OP(){}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue