*** empty log message ***

svn path=/trunk/boinc/; revision=11240
This commit is contained in:
David Anderson 2006-10-03 20:13:15 +00:00
parent 96ce7efd77
commit 894d443614
4 changed files with 14 additions and 0 deletions

View File

@ -10752,3 +10752,11 @@ David 3 Oct 2006
client_state.h
cpu_sched.C
cs_scheduler.C
David 3 Oct 2006
- core client: fixed bug that could cause Curl to be
passed a null pointer (bandwidth limiting)
client/
file_xfer.C
http_curl.C,h

View File

@ -368,6 +368,7 @@ void FILE_XFER_SET::set_bandwidth_limits(bool is_upload) {
int n = 0;
for (i=0; i<file_xfers.size(); i++) {
fxp = file_xfers[i];
if (!fxp->is_active()) continue;
if (is_upload) {
if (!fxp->is_upload) continue;
} else {
@ -379,6 +380,7 @@ void FILE_XFER_SET::set_bandwidth_limits(bool is_upload) {
max_bytes_sec /= n;
for (i=0; i<file_xfers.size(); i++) {
fxp = file_xfers[i];
if (!fxp->is_active()) continue;
if (is_upload) {
if (!fxp->is_upload) continue;
fxp->set_speed_limit(true, max_bytes_sec);

View File

@ -1041,6 +1041,7 @@ void HTTP_OP::update_speed() {
void HTTP_OP::set_speed_limit(bool is_upload, double bytes_sec) {
CURLcode cc;
curl_off_t bs = (curl_off_t)bytes_sec;
if (is_upload) {
cc = curl_easy_setopt(curlEasy, CURLOPT_MAX_SEND_SPEED_LARGE, bs);
} else {

View File

@ -130,6 +130,9 @@ public:
bool http_op_done();
int set_proxy(PROXY_INFO *new_pi);
void setupProxyCurl();
bool is_active() {
return curlEasy!=NULL;
}
private:
// internal use in the class -- takes an init_get/post/post2 and turns it into