From 8d788b3d3bfb87f25c31a91d48e979e5749a7bd1 Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Fri, 19 Feb 2010 16:03:57 +0100 Subject: Avoid timeout on job-related methods for invalid jobs We were not returning anything. https://bugzilla.redhat.com/show_bug.cgi?id=548790 --- src/cups-pk-helper-mechanism.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/cups-pk-helper-mechanism.c b/src/cups-pk-helper-mechanism.c index 7026635..ed644b8 100644 --- a/src/cups-pk-helper-mechanism.c +++ b/src/cups-pk-helper-mechanism.c @@ -1058,8 +1058,10 @@ cph_mechanism_job_cancel_purge (CphMechanism *mechanism, return FALSE; break; } - case CPH_JOB_STATUS_INVALID: + case CPH_JOB_STATUS_INVALID: { + _cph_mechanism_return_error (mechanism, context, TRUE); return FALSE; + } } ret = cph_cups_job_cancel (mechanism->priv->cups, id, purge, user_name); @@ -1100,8 +1102,10 @@ cph_mechanism_job_restart (CphMechanism *mechanism, return FALSE; break; } - case CPH_JOB_STATUS_INVALID: + case CPH_JOB_STATUS_INVALID: { + _cph_mechanism_return_error (mechanism, context, TRUE); return FALSE; + } } ret = cph_cups_job_restart (mechanism->priv->cups, id, user_name); @@ -1143,8 +1147,10 @@ cph_mechanism_job_set_hold_until (CphMechanism *mechanism, return FALSE; break; } - case CPH_JOB_STATUS_INVALID: + case CPH_JOB_STATUS_INVALID: { + _cph_mechanism_return_error (mechanism, context, TRUE); return FALSE; + } } ret = cph_cups_job_set_hold_until (mechanism->priv->cups, id, job_hold_until, user_name); -- cgit v1.2.3