Skip to content

Commit

Permalink
Merge pull request #74 from tsite/m2
Browse files Browse the repository at this point in the history
backend/ipp: Change handling of job_canceled
  • Loading branch information
michaelrsweet committed Mar 7, 2021
2 parents 81007ed + eb60f2d commit 8f027f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/ipp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2240,7 +2240,8 @@ main(int argc, /* I - Number of command-line args */
else if (ipp_status == IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED)
fputs("JOBSTATE: account-authorization-failed\n", stderr);

if (job_canceled)
// job_canceled can be -1 which should not be treated as CUPS_BACKEND_OK
if (job_canceled > 0)
return (CUPS_BACKEND_OK);
else if (ipp_status == IPP_STATUS_ERROR_NOT_AUTHORIZED || ipp_status == IPP_STATUS_ERROR_FORBIDDEN || ipp_status == IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED)
return (CUPS_BACKEND_AUTH_REQUIRED);
Expand Down

0 comments on commit 8f027f1

Please sign in to comment.