mike [Fri, 3 Feb 2006 16:51:05 +0000 (16:51 +0000)]
Pass original filename in document-name attribute, and use it as a further
hint when auto-typing.
cups/util.c:
- cupsPrintFiles2(): Add document-name attribute to Print-Job
or Send-Document request.
scheduler/ipp.c:
- print_job(): Pass document-name value as filename to
mimeFileType().
- send_document(): Pass document-name value as filename to
mimeFileType().
mike [Thu, 2 Feb 2006 16:13:16 +0000 (16:13 +0000)]
Add filename argument to mimeFileType() so that we can pass in the
"original" filename as well as the on-disk pathname - future MIME type
matching on document-name attribute.
Also use shared file buffer structure for mimeFileType() - that yields
a 3-fold performance improvement in testmime.
mike [Thu, 2 Feb 2006 15:55:08 +0000 (15:55 +0000)]
Add performance testing to MIME test program - basically type all of the
source files in the CUPS tree and figure out how to convert to
application/vnd.cups-postscript.
mike [Wed, 1 Feb 2006 21:48:01 +0000 (21:48 +0000)]
Simplify the MacOS X install/package stuff by not autodetecting the
launchd stuff at install time. Instead, rely on the build system info
since we'll need separate packages for 10.2/10.3 and 10.4 anyways.
cups/dir.c
- cupsDirRead(): Use lstat() instead of stat(), since we care
about the permissions of the destination file, not the link
itself.
packaging/cups.spec.in
- Install the lpd backend mode 700.
scheduler/cups-deviced.c
- main(): Add command-line argument for user ID and check the
permissions of the backends before executing them (mode 700
= root, anything else is the unprivileged user ID from the
command-line)
- main(): Return IPP "bad request" error if we get
command-line errors.
scheduler/ipp.c
- copy_model(): Free the select() buffer (memory leak)
- get_devices(): Add the User value to the command-line
passed to SendCommand().
scheduler/job.c
- cupsdStartJob(): Only run backends that are not readable by
ordinary users as root.
scheduler/process.c
- cupsdStartProcess(): Call setgid() for non-root processes
in addition to setgroups().
mike [Wed, 1 Feb 2006 18:55:16 +0000 (18:55 +0000)]
Use cupsArray API to store network interface list, and allocate the hostname
to save some memory.
scheduler/auth.c:
- cupsdCheckAuth(): Use cupsArrayFirst/Next() to loop through
interfaces.
scheduler/dirsvc.c:
- cupsdSendCUPSBrowse(): Use cupsArrayFirst/Next() to loop
through interfaces.
- cupsdUpdateCUPSBrowse(): Use cupsArrayFirst/Next() to loop
through interfaces.
scheduler/network.c:
- Make local functions static.
- compare_netif(): Added.
- cupsdNetIFFree(): Use cupsArray functions for interfaces.
- cupsdNetIFUpdate(): Use cupsArray functions for interfaces, allocate
the cupsd_netif_t structure dynamically for the length of the hostname.
scheduler/network.h:
- Remove cupsdNetIFFree() from global functions.
- Move hostname to end of cupsd_netif_t structure so it can
be allocated.
mike [Wed, 1 Feb 2006 16:29:57 +0000 (16:29 +0000)]
Add support for Apple recoverable:/recovered: messages and
com.apple.print.recoverable-message attribute.
scheduler/ipp.c:
- copy_printer_attrs(): Copy com.apple.print.recoverable-message
attribute as needed.
scheduler/job.c
- cupsdUpdateJob(): Handle recoverable: and recovered: messages.
scheduler/printers.c
- cupsdAddPrinterHistory(): Add com.apple.print.recoverable-message
to history.
- cupsdDeletePrinter(): Clear recoverable string as needed.
scheduler/printers.h
- Add recoverable string to cupsd_printer_t structure.
mike [Wed, 1 Feb 2006 16:03:02 +0000 (16:03 +0000)]
printer-state-message and other job handling updates.
doc/cups.css:
- Add SPAN.message style for printer-state-message.
scheduler/job.c:
- cupsdFinishJob(): Stop jobs when there are filter errors
instead of cancelling them, clear the printer-state-message
when a job completes successfully.
- cupsdUpdateJob(): Copy normal messages to
printer-state-message, and update the printer state history
for state messages.
scheduler/statbuf.c:
- cupsdStatBufUpdate(): Log ATTR:, PAGE:, and STATE: messages
at log level debug2.
templates/classes.tmpl:
templates/printers.tmpl:
- Move printer-state-message to the title area of the
printer/class template so it is more prominent.
mike [Mon, 30 Jan 2006 03:49:12 +0000 (03:49 +0000)]
Add DBUS support to the scheduler.
Update event list to separate state changes from created, completed, and
stopped, to conform to RFC 3995. Also add job started event in
cupsdStartJob().
mike [Fri, 27 Jan 2006 19:30:34 +0000 (19:30 +0000)]
Add configure options to set the default values of various cupsd.conf settings.
Fix the OSX test package script to update the web interface files before
doing the install into the package directory - that way the revision
number appears.
Generate template/header.tmpl so that the version number is shown correctly
on all pages.
In cupsdStartBrowsing(), decouple the socket creation from the socket
"broadcast" and "close on exec" options, since launchd will be providing
the BrowseSocket for us on MacOS X.
mike [Thu, 26 Jan 2006 21:59:54 +0000 (21:59 +0000)]
Rename cupsPageScaling to cupsBorderlessScalingFactor, per Apple usage.
Add num_options and options to cupsRasterInterpretPPD, support and
option override for cupsBorderlessScalingFactor, and scale the
integer versions of the page size and imaging bounding box with the
scaling factor.
mike [Wed, 25 Jan 2006 21:34:00 +0000 (21:34 +0000)]
Add floating point PageSize and ImagingBBox values along with page
scaling (used for full-bleed with some CUPS drivers) and the name of
the page size that was selected.
mike [Wed, 25 Jan 2006 19:57:45 +0000 (19:57 +0000)]
Clean up some PostScript output issues and add new order-dependent APIs.
cups/emit.c:
- ppdCollect2(): Added
- ppdEmitAfterOrder(): Added, support floating point page sizes.
- ppd_handle_media(): Fix manual feed/input slot detection code
so that PageRegion is used as needed.
cups/ppd.h:
- Add ppdCollect2() and ppdEmitAfterOrder() functions.
cups/mark.c:
- ppdMarkOption(): Add support for AP_D_InputSlot pseudo-option
and fix InputSlot/ManualFeed option issues.
cups/options.c:
- cupsMarkOptions(): Don't allow an empty PageSize option to
override media.
mike [Wed, 25 Jan 2006 15:07:40 +0000 (15:07 +0000)]
Fix some networking issues, add support for Darwin's SO_NOSIGPIPE
socket option, and update the CDSA support.
- Use socket option instead of setting SIGPIPE handler (if possible.)
<rdar://problem/3307769> CUPS shouldn't use SIGPIPE
- SO_NOSIGPIPE is Darwin-specific, so #ifdef SO_NOSIGPIPE
to determine whether we fiddle with the signal stuff.
- This change appears in http-addrlist.c in the httpAddrConnect
function, which is used to create all sockets...
- httpFlush(): disable blocking temporarily while flushing?
- Yes, but check the state - if we haven't completed the
current request/response, close the socket and reset the
state.
- http_send(): check return value of httpReconnect, abort early if failed
- http_wait(): Add fd<0 guard.
- http_real_ssl(), http_write_ssl(), CDSAReadFunc(), CDSAWrieFunc():
- Update error handling to match...
mike [Wed, 25 Jan 2006 07:04:33 +0000 (07:04 +0000)]
Merge features and bug fixes.
backend/lpd.c:
- Add contimeout option and also look in OSX system preferences for
the maximum time we wait to finally connect to the printer.
- Add OSX proxy error handling support.
- Fix to properly support + and & as separators.
backend/socket.c:
- Add waiteof option - when set to false/no/off, the backend will
no longer shutdown the transmit side of the socket and wait for
the printer to close its side.
berkeley/lpr.c:
- Use ssize_t and off_t variables for read/write and lseek so
that things work properly with large file support.
systemv/lp.c:
- Use ssize_t and off_t variables for read/write and lseek so
that things work properly with large file support.
- "-m" makes lp silent, per OpenGroup specs.
- "--" stops option processing, per OpenGroup specs.
mike [Fri, 20 Jan 2006 22:19:13 +0000 (22:19 +0000)]
Add mailto: notifier and fix some notification bugs.
berkeley/lpr.c:
systemv/lp.c:
- main(): Fix email address for notifications (mailto:user@hostname)
cups/cups.h:
- Add cupsNotifySubject() and cupsNotifyText() APIs.
cups/http-support.c:
- httpDecode64_2(): Initialize "out" buffer when "in" is empty.
cups/notify.c:
- Added.
notifier/mailto.c:
- Added - previous file was just the skeleton.
scheduler/env.c:
- Add SERVER_ADMIN environment variable for setting the default
administrator's email address.
scheduler/subscriptions.c:
- cupsdAddEvent(): Add job-name, if set, and use proper attribute
names for notify-printer-uri and notify-job-id.
- cupsdExpireSubscriptions(): Don't expire job subcriptions based
on time, just on the life of the job.