diff --git a/sched/handle_request.cpp b/sched/handle_request.cpp index 8807f9feb8..84fb3b7de8 100644 --- a/sched/handle_request.cpp +++ b/sched/handle_request.cpp @@ -1418,10 +1418,12 @@ void process_request(char* code_sign_key) { if (diff < config.min_sendwork_interval) { ok_to_send_work = false; log_messages.printf(MSG_NORMAL, - "Not sending work - last request too recent, please wait: %f\n", config.min_sendwork_interval + "Not sending work. Last request too recent. Please wait %d seconds.\n", + (int)(config.min_sendwork_interval - diff) ); sprintf(buf, - "Not sending work - last request too recent, please wait: %d sec", (int)config.min_sendwork_interval + "Not sending work. Last request too recent. Please wait %d seconds.\n", + (int)(config.min_sendwork_interval - diff) ); g_reply->insert_message(buf, "low"); diff --git a/sched/sched_version.cpp b/sched/sched_version.cpp index 931f343cf7..528aa7fbac 100644 --- a/sched/sched_version.cpp +++ b/sched/sched_version.cpp @@ -151,7 +151,9 @@ inline bool daily_quota_exceeded(DB_ID_TYPE gavid, HOST_USAGE& hu) { } bool daily_quota_exceeded(BEST_APP_VERSION* bavp) { - return daily_quota_exceeded(bavp->avp->id, bavp->host_usage); + DB_HOST_APP_VERSION* havp = bavp->host_app_version(); + if (!havp) return false; + return daily_quota_exceeded(havp->app_version_id, bavp->host_usage); } // scan through client's anonymous apps and pick the best one