-CHANGES.txt - 1.7b1 - 2012-12-11
+CHANGES.txt - 1.7b1 - 2013-01-21
--------------------------------
CHANGES IN CUPS V1.7b1
+ - Added a new "-x" option to the cancel command (STR #4103)
- Added new IPP APIs for checking values (STR #4167)
- Added new IPP APis for adding and setting formatted strings.
- Added new HTTP APIs to support basic server functionality via libcups.
.\" which should have been included with this file. If this file is
.\" file is missing or damaged, see the license at "http://www.cups.org/".
.\"
-.TH cancel 1 "CUPS" "20 March 2006" "Apple Inc."
+.TH cancel 1 "CUPS" "21 January 2013" "Apple Inc."
.SH NAME
cancel - cancel jobs
.SH SYNOPSIS
.I hostname[:port]
] [ -u
.I username
-] [
+] [ -x ] [
.I id
] [
.I destination
-u username
.br
Cancels jobs owned by \fIusername\fR.
+.TP 5
+-x
+.br
+Deletes job data files in addition to canceling.
.SH COMPATIBILITY
Unlike the System V printing system, CUPS allows printer names to
contain any printable character except SPACE, TAB, "/", or "#".
*
* IPP routines for the CUPS scheduler.
*
- * Copyright 2007-2012 by Apple Inc.
+ * Copyright 2007-2013 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* This file contains Kerberos support code, copyright 2006 by
{
for (i = 0; i < job_ids->num_values; i ++)
{
- if (!cupsdFindJob(job_ids->values[i].integer))
+ if ((job = cupsdFindJob(job_ids->values[i].integer)) == NULL)
break;
+
+ if (con->request->request.op.operation_id == IPP_CANCEL_MY_JOBS &&
+ _cups_strcasecmp(job->username, username))
+ break;
}
if (i < job_ids->num_values)
if ((job = cupsdFindJob(job_ids->values[i].integer)) == NULL ||
_cups_strcasecmp(job->dest, printer->name))
break;
+
+ if (con->request->request.op.operation_id == IPP_CANCEL_MY_JOBS &&
+ _cups_strcasecmp(job->username, username))
+ break;
}
if (i < job_ids->num_values)
*
* "cancel" command for CUPS.
*
- * Copyright 2007-2011 by Apple Inc.
+ * Copyright 2007-2013 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
break;
case 'a' : /* Cancel all jobs */
- purge = 1;
- op = IPP_PURGE_JOBS;
+ op = IPP_CANCEL_JOBS;
break;
case 'h' : /* Connect to host */
}
break;
+ case 'x' : /* Purge job(s) */
+ purge = 1;
+ break;
+
default :
_cupsLangPrintf(stderr,
_("%s: Error - unknown option \"%c\"."),
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name", NULL, user);
ippAddBoolean(request, IPP_TAG_OPERATION, "my-jobs", 1);
+
+ if (op == IPP_CANCEL_JOBS)
+ op = IPP_CANCEL_MY_JOBS;
}
else
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name", NULL, cupsUser());
- if (op == IPP_PURGE_JOBS)
+ if (purge)
ippAddBoolean(request, IPP_TAG_OPERATION, "purge-jobs", purge);
/*
* Do the request and get back a response...
*/
- if (op == IPP_PURGE_JOBS && (!user || _cups_strcasecmp(user, cupsUser())))
+ if (op == IPP_CANCEL_JOBS && (!user || _cups_strcasecmp(user, cupsUser())))
response = cupsDoRequest(http, request, "/admin/");
else
response = cupsDoRequest(http, request, "/jobs/");