@@ -3106,6 +3106,8 @@ priv_submit_run(
31063106 int sender_user_id = -1;
31073107 int sender_ssl_flag;
31083108 ej_ip_t sender_ip;
3109+ int not_ok_is_cf = 0;
3110+ int rejudge_flag = 0;
31093111
31103112 if (opcaps_check(phr->caps, OPCAP_SUBMIT_RUN) < 0) {
31113113 FAIL(NEW_SRV_ERR_PERMISSION_DENIED);
@@ -3140,6 +3142,9 @@ priv_submit_run(
31403142 sender_ssl_flag = phr->ssl_flag;
31413143 }
31423144
3145+ hr_cgi_param_int_opt(phr, "not_ok_is_cf", ¬_ok_is_cf, 0);
3146+ hr_cgi_param_int_opt(phr, "rejudge_flag", &rejudge_flag, 0);
3147+
31433148 if (hr_cgi_param(phr, "problem_uuid", &s) > 0) {
31443149 for (prob_id = 1; prob_id <= cs->max_prob; ++prob_id) {
31453150 prob = cs->probs[prob_id];
@@ -3545,9 +3550,9 @@ priv_submit_run(
35453550 prob->style_checker_env,
35463551 -1, 0, 0, prob, lang, 0, &run_uuid,
35473552 NULL /* judge_uuid */,
3548- store_flags, 0 /* rejudge_flag */ ,
3553+ store_flags, rejudge_flag,
35493554 phr->is_job,
3550- 0 /* not_ok_is_cf */ ,
3555+ not_ok_is_cf,
35513556 user)) < 0) {
35523557 serve_report_check_failed(ejudge_config, cnts, cs, run_id, serve_err_str(r));
35533558 }
@@ -3579,9 +3584,9 @@ priv_submit_run(
35793584 &run_uuid,
35803585 NULL /* judge_uuid */,
35813586 store_flags,
3582- 0 /* rejudge_flag*/ ,
3587+ rejudge_flag,
35833588 phr->is_job,
3584- 0 /* not_ok_is_cf */ ,
3589+ not_ok_is_cf,
35853590 user);
35863591 if (r < 0) {
35873592 serve_report_check_failed(ejudge_config, cnts, cs, run_id, serve_err_str(r));
@@ -3595,9 +3600,9 @@ priv_submit_run(
35953600 NULL, /* judge_uuid */
35963601 -1, 0,
35973602 mime_type, 0, phr->locale_id, 0, 0, 0, &run_uuid,
3598- 0 /* rejudge_flag */ , 0 /* zip_mode */,
3603+ rejudge_flag, 0 /* zip_mode */,
35993604 store_flags,
3600- 0 /* not_ok_is_cf */ ,
3605+ not_ok_is_cf,
36013606 NULL, 0) < 0) {
36023607 FAIL(NEW_SRV_ERR_DISK_WRITE_ERROR);
36033608 }
@@ -3632,9 +3637,9 @@ priv_submit_run(
36323637 &run_uuid,
36333638 NULL /* judge_uuid */,
36343639 store_flags,
3635- 0 /* rejudge_flag */ ,
3640+ rejudge_flag,
36363641 phr->is_job,
3637- 0 /* not_ok_is_cf */ ,
3642+ not_ok_is_cf,
36383643 user);
36393644 if (r < 0) {
36403645 serve_report_check_failed(ejudge_config, cnts, cs, run_id, serve_err_str(r));
@@ -3648,9 +3653,9 @@ priv_submit_run(
36483653 NULL, /* judge_uuid */
36493654 -1, 0,
36503655 mime_type, 0, phr->locale_id, 0, 0, 0, &run_uuid,
3651- 0 /* rejudge_flag */ , 0 /* zip_mode */,
3656+ rejudge_flag, 0 /* zip_mode */,
36523657 store_flags,
3653- 0 /* not_ok_is_cf */ ,
3658+ not_ok_is_cf,
36543659 NULL, 0) < 0) {
36553660 FAIL(NEW_SRV_ERR_DISK_WRITE_ERROR);
36563661 }
0 commit comments