summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Untz <vuntz@novell.com>2010-02-19 16:03:57 +0100
committerVincent Untz <vuntz@novell.com>2010-02-19 16:03:57 +0100
commit8d788b3d3bfb87f25c31a91d48e979e5749a7bd1 (patch)
tree66a45d8f9bdcdb81b3ae68775cf220dbd76d57bb
parent8e8ba5fdddc8c0ac8fd146742e742103ae2e8edb (diff)
Avoid timeout on job-related methods for invalid jobs
We were not returning anything. https://bugzilla.redhat.com/show_bug.cgi?id=548790
-rw-r--r--src/cups-pk-helper-mechanism.c12
1 files 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);