diff --git a/wrenchboard/src/shared_tool/jobs.cc b/wrenchboard/src/shared_tool/jobs.cc index 3be214d8..952b9fae 100644 --- a/wrenchboard/src/shared_tool/jobs.cc +++ b/wrenchboard/src/shared_tool/jobs.cc @@ -301,7 +301,7 @@ long WrenchJobPostCancelOffer(CVars in, CVars &out){ try { REQ_LONG(in, "member_id", 1, -1); - long offer_result = REQ_LONG(in, "offer_result", 1, -1); + //long offer_result = REQ_LONG(in, "offer_result", 1, -1); REQ_STRING(in, "offer_code", 1, 15, "(.*)"); long job_id = 0; long owner_member_id = 0; @@ -311,7 +311,7 @@ long WrenchJobPostCancelOffer(CVars in, CVars &out){ CVars outx; // rc = 0 + load_db_record( out, "SELECT * FROM members_jobs_offer WHERE offer_code='%s' AND status = 1", in["offer_code"].c_str() ); const PGresult *res = pgsql_query("SELECT *,member_id AS owner_member_id, id AS offer_id " - " FROM members_jobs_offer WHERE offer_code='%s' AND status = 1", in["offer_code"].c_str()); + " FROM members_jobs_offer WHERE offer_code='%s' AND status = 1 AND member_id = %lu", in["offer_code"].c_str(), in["member_id"].Long()); if (res != NULL && pgsql_num_rows(res) > 0) { // now job is valid