From d737c428ff69741630a3d6d810e7466d737eca78 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 17 Jun 2008 16:09:27 +0000 Subject: [PATCH] - scheduler: if host.n_bwdown is zero, skip the bandwidth check; the host hasn't been measured yet. svn path=/trunk/boinc/; revision=15409 --- checkin_notes | 7 +++++++ client/hostinfo_unix.C | 34 ++++++++++++++++------------------ doc/addon_data.php | 6 +++--- doc/boinc_news.php | 4 ++++ doc/logo.php | 2 ++ sched/sched_send.C | 6 ++++++ 6 files changed, 38 insertions(+), 21 deletions(-) diff --git a/checkin_notes b/checkin_notes index 8e1126a74c..f59a7cf4d4 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4887,3 +4887,10 @@ David 16 June 2008 client/ client_state.C + +David 16 June 2008 + - scheduler: if host.n_bwdown is zero, skip the bandwidth check; + the host hasn't been measured yet. + + sched/ + sched_send.C diff --git a/client/hostinfo_unix.C b/client/hostinfo_unix.C index 2b78bc5273..8807492248 100644 --- a/client/hostinfo_unix.C +++ b/client/hostinfo_unix.C @@ -190,29 +190,27 @@ int get_timezone() { // Returns true if the host is currently running off battery power // If you can't figure out, return false // -// TODO: port this to other platforms (Windows, others?) -// bool HOST_INFO::host_is_running_on_batteries() { #if defined(__APPLE__) - CFDictionaryRef pSource = NULL; - CFStringRef psState; - int i; - bool retval = false; + CFDictionaryRef pSource = NULL; + CFStringRef psState; + int i; + bool retval = false; - CFTypeRef blob = IOPSCopyPowerSourcesInfo(); - CFArrayRef list = IOPSCopyPowerSourcesList(blob); + CFTypeRef blob = IOPSCopyPowerSourcesInfo(); + CFArrayRef list = IOPSCopyPowerSourcesList(blob); - for(i = 0; i < CFArrayGetCount(list); i++) { - pSource = IOPSGetPowerSourceDescription(blob, CFArrayGetValueAtIndex(list, i)); - if(!pSource) break; - psState = (CFStringRef)CFDictionaryGetValue(pSource, CFSTR(kIOPSPowerSourceStateKey)); - if(!CFStringCompare(psState,CFSTR(kIOPSBatteryPowerValue),0)) - retval = true; - } + for (i=0; i3-D versions of the BOINC logo + are now available; thanks to John from Ireland for creating these." +), array("June 2, 2008", "BOINCstats and BAM! are now available in Brazilian Portuguese and diff --git a/doc/logo.php b/doc/logo.php index 9855bc230d..72e46b89e4 100644 --- a/doc/logo.php +++ b/doc/logo.php @@ -40,7 +40,9 @@ The colors are based on U.C. Berkeley's blue-and-gold colors.
  • Scalable Vector Graphics (.svg)
  • 1280x535, transparent background (.png)
  • Windows meta-file (.wmf) +
  • 3D versions (various sizes) +< Icon:
    • Bitmaps (.bmp): diff --git a/sched/sched_send.C b/sched/sched_send.C index bc56c189c4..6a5e97a55a 100644 --- a/sched/sched_send.C +++ b/sched/sched_send.C @@ -518,6 +518,12 @@ static inline int check_bandwidth( WORKUNIT& wu, SCHEDULER_REQUEST& , SCHEDULER_REPLY& reply ) { if (wu.rsc_bandwidth_bound == 0) return 0; + + // if n_bwdown is zero, the host has never downloaded anything, + // so skip this check + // + if (host.n_bwdown == 0) return 0; + double diff = wu.rsc_bandwidth_bound - reply.host.n_bwdown; if (diff > 0) { char message[256];