Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scheduler: fix crashing bug in anonymous platform case. #3449

Merged
merged 1 commit into from
Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions sched/handle_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
4 changes: 3 additions & 1 deletion sched/sched_version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down