CHANGES IN CUPS V1.3.9
- Documentation updates (STR #2904)
+ - The scheduler did not correctly update the
+ auth-info-required value(s) if the AuthType was Default.
- The scheduler required Kerberos authentication for
all operations on remote Kerberized printers instead
of just for the operations that needed it.
-CHANGES.txt - 2008-08-04
+CHANGES.txt - 2008-08-28
------------------------
CHANGES IN CUPS V1.4b1
+ - The scheduler now supports a job-media-progress attribute to
+ track the progress of individual pages.
- The sample HP driver now supports A5 (STR #2798)
- The CUPS web interface menu item now uses the xdg-open
command, when available (STR #2724)
usb: usb.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
- $(CC) $(LDFLAGS) -o usb usb.o libbackend.a $(LIBUSB) $(BACKLIBS) $(LIBS)
+ $(CC) $(ARCHFLAGS) $(LDFLAGS) -o usb usb.o libbackend.a $(LIBUSB) \
+ $(BACKLIBS) $(LIBS)
usb.o: usb.c usb-darwin.c usb-libusb.c usb-unix.c
int print_fd; /* Print file */
int copies; /* Number of copies to print */
time_t start_time, /* Time of first connect */
+ current_time, /* Current time */
wait_time; /* Time to wait before shutting down socket */
int recoverable; /* Recoverable error shown? */
int contimeout; /* Connection timeout */
*/
wait_time = time(NULL) + 5;
- while (wait_time >= time(NULL))
- if (wait_bc(device_fd, 1) <= 0)
+ while (wait_time >= time(¤t_time))
+ if (wait_bc(device_fd, wait_time - current_time) <= 0)
break;
if (waiteof)
# else
cpu_type_t cpu = CPU_TYPE_POWERPC;
# endif /* __x86_64__ */
- size_t ocount = 0;
+ size_t ocount = 1;
posix_spawnattr_t attrs;
if (!posix_spawnattr_init(&attrs))
{
posix_spawnattr_setsigdefault(attrs, &oldmask);
- posix_spawnattr_setbinpref_np(attrs, 1, &cpu, &ocount);
+ if (posix_spawnattr_setbinpref_np(attrs, 1, &cpu, &ocount) || ocount != 1)
+ {
+# ifdef __x86_64__
+ perror("DEBUG: Unable to set binary preference to i386");
+# else
+ perror("DEBUG: Unable to set binary preference to ppc");
+# endif /* __x86_64__ */
+ _cupsLangPrintf(stderr, _("Unable to use legacy USB class driver!\n"));
+ exit(CUPS_BACKEND_STOP);
+ }
}
/*
if (posix_spawn(&child_pid, "/usr/libexec/cups/backend/usb", NULL, &attrs,
my_argv, environ))
{
- _cupsLangPrintf(stderr, _("Unable to use legacy USB class driver!\n"));
perror("DEBUG: Unable to exec /usr/libexec/cups/backend/usb");
+ _cupsLangPrintf(stderr, _("Unable to use legacy USB class driver!\n"));
exit(CUPS_BACKEND_STOP);
}
<h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
-<p>CUPS 1.1 implements IPP/1.1 and the operations and attributes
+<p>CUPS implements IPP/1.1 and the operations and attributes
defined in the "IPP: Job and Printer Set Operations", "IPP/1.1:
Output-bin Attribute Extension", and "IPP/1.1: finishings
'fold',' trim', and 'bale' attribute values extension"
specified time is less than the current time, the job is held until the
next day.
+<h4><a name="job-media-progress">job-media-progress (integer(0:100))</a><span class='info'>CUPS 1.4</span></h4>
+
+<p>The job-media-progress attribute specifies the percentage of completion of
+the current page. It is only valid when the job-state attribute has the
+"processing" value (5).</p>
+
<h4><a name="job-printer-state-message">job-printer-state-message (text(MAX))</a><span class='info'>CUPS 1.3</span></h4>
<p>The job-printer-state-message attribute provides the last known value of the printer-state-message attribute for the printer that processed (or is processing) the job.</p>
$(LIBCUPSDRIVER) \
$(LIB32CUPSDRIVER) \
$(LIB64CUPSDRIVER) \
- libcupsdriver.a \
+ libcupsdriver.a
+UNITTARGETS = \
testcmyk \
testdither \
testrgb
# Make unit tests...
#
-unittests:
+unittests: $(UNITTARGETS)
#
clean:
$(RM) $(OBJS) core
$(RM) *.bck core.*
- $(RM) $(TARGETS)
+ $(RM) $(TARGETS) $(UNITTARGETS)
$(RM) -r test
$(RM) libcupsdriver.so libcupsdriver.sl libcupsdriver.dylib
$(RM) -r 32bit 64bit
$(LIBCUPSMIME) \
$(LIB32CUPSMIME) \
$(LIB64CUPSMIME) \
- libcupsmime.a \
- testmime
+ libcupsmime.a
+
+UNITTARGETS = \
+ testdirsvc \
+ testlpd \
+ testmime \
+ testspeed \
+ testsub
TARGETS = \
$(LIBTARGETS) \
cups-driverd \
cups-lpd \
cups-polld \
- testdirsvc \
- testlpd \
- testspeed \
- testsub
#
# Make unit tests...
#
-unittests:
+unittests: $(UNITTARGETS)
#
clean:
$(RM) $(OBJS)
- $(RM) $(TARGETS) convert
+ $(RM) $(TARGETS) $(UNITTARGETS) convert
$(RM) libcupsmime.so libcupsmime.sl libcupsmime.dylib
$(RM) -r 32bit 64bit
* add_job() - Add a job to a print queue.
* add_job_state_reasons() - Add the "job-state-reasons" attribute based
* upon the job and printer state...
- * add_job_subscriptions() - Add any subcriptions for a job.
+ * add_job_subscriptions() - Add any subscriptions for a job.
* add_job_uuid() - Add job-uuid attribute to a job.
* add_printer() - Add a printer to the system.
* add_printer_state_reasons() - Add the "printer-state-reasons" attribute
/*
- * 'add_job_subscriptions()' - Add any subcriptions for a job.
+ * 'add_job_subscriptions()' - Add any subscriptions for a job.
*/
static void
device_name = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks);
- printer_name = CFStringCreateWithCString(kCFAllocatorDefault, p->name,
- kCFStringEncodingUTF8);
+ printer_name = CFStringCreateWithCString(kCFAllocatorDefault,
+ p->name, kCFStringEncodingUTF8);
if (device_name && printer_name)
{
ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_INTEGER,
"document-count", job->num_files);
+ if (!ra || cupsArrayFind(ra, "job-media-progress"))
+ ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_INTEGER,
+ "job-media-progress", job->progress);
+
if (!ra || cupsArrayFind(ra, "job-more-info"))
ippAddString(con->response, IPP_TAG_JOB, IPP_TAG_URI,
"job-more-info", NULL, job_uri);
cupsArrayAdd(ra, "job-impressions-completed");
cupsArrayAdd(ra, "job-k-octets");
cupsArrayAdd(ra, "job-k-octets-processed");
+ cupsArrayAdd(ra, "job-media-progress");
cupsArrayAdd(ra, "job-media-sheets");
cupsArrayAdd(ra, "job-media-sheets-completed");
cupsArrayAdd(ra, "job-message-from-operator");
job->state->values[0].integer = IPP_JOB_PROCESSING;
job->state_value = IPP_JOB_PROCESSING;
-
- job->status = 0;
- job->printer = printer;
- printer->job = job;
+ job->progress = 0;
+ job->status = 0;
+ job->printer = printer;
+ printer->job = job;
cupsdSetPrinterState(printer, IPP_PRINTER_PROCESSING, 0);
cupsdMarkDirty(CUPSD_DIRTY_PRINTERS);
}
+ if ((attr = cupsGetOption("job-media-progress", num_attrs,
+ attrs)) != NULL)
+ {
+ int progress = atoi(attr);
+
+
+ if (progress >= 0 && progress <= 100)
+ {
+ job->progress = progress;
+
+ if (job->sheets)
+ cupsdAddEvent(CUPSD_EVENT_JOB_PROGRESS, job->printer, job,
+ "Printing page %d, %d%%",
+ job->sheets->values[0].integer, job->progress);
+ }
+ }
+
if ((attr = cupsGetOption("printer-alert", num_attrs, attrs)) != NULL)
{
cupsdSetString(&job->printer->alert, attr);
*auth_domain, /* AUTH_DOMAIN environment variable, if any */
*auth_password; /* AUTH_PASSWORD environment variable, if any */
void *profile; /* Security profile */
+ int progress; /* Printing progress */
#ifdef HAVE_GSSAPI
krb5_ccache ccache; /* Kerberos credential cache */
char *ccname; /* KRB5CCNAME environment variable */
if (auth)
{
- if (auth->type == CUPSD_AUTH_BASIC || auth->type == CUPSD_AUTH_BASICDIGEST)
+ int auth_type; /* Authentication type */
+
+
+ if ((auth_type = auth->type) == CUPSD_AUTH_DEFAULT)
+ auth_type = DefaultAuthType;
+
+ if (auth_type == CUPSD_AUTH_BASIC || auth_type == CUPSD_AUTH_BASICDIGEST)
{
auth_supported = "basic";
num_air = 2;
air = air_userpass;
}
- else if (auth->type == CUPSD_AUTH_DIGEST)
+ else if (auth_type == CUPSD_AUTH_DIGEST)
{
auth_supported = "digest";
num_air = 2;
air = air_userpass;
}
#ifdef HAVE_GSSAPI
- else if (auth->type == CUPSD_AUTH_NEGOTIATE)
+ else if (auth_type == CUPSD_AUTH_NEGOTIATE)
{
auth_supported = "negotiate";
num_air = 1;
}
#endif /* HAVE_GSSAPI */
- if (auth->type != CUPSD_AUTH_NONE)
+ if (auth_type != CUPSD_AUTH_NONE)
p->type |= CUPS_PRINTER_AUTHENTICATED;
else
p->type &= ~CUPS_PRINTER_AUTHENTICATED;