~ubuntu-branches/ubuntu/jaunty/cups/jaunty

« back to all changes in this revision

Viewing changes to cups/request.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt, Till Kamppeter, Martin Pitt
  • Date: 2009-02-15 18:39:03 UTC
  • mfrom: (6.1.30 jaunty)
  • Revision ID: james.westby@ubuntu.com-20090215183903-i0nhvqyqj4vyn52a
Tags: 1.3.9-13
[ Till Kamppeter ]
* debian/local/filters/pdf-filters/filter/imagetopdf.c: Added support for
  the new "fit-to-page" option (new, more intuitive name for "fitplot").
* debian/filters/pstopdf: Only apply paper size if the "fitplot" or the
  "fit-to-page" option is set.
* debian/local/filters/cpdftocps: Only the last digit of the number of
  copies was used (LP: #309314).
* debian/local/filters/pdf-filters/pdftopdf/pdftopdf.cxx: Do not preceed the
  PDF output with a newline (LP: #303691). Only impose the page size from
  the PPD file to all pages if the "fitplot" or the "fit-to-page" option is 
  set. This prevented from automatic paper tray switching to the correct paper
  sizes when a multiple-page-size document is printed (partial fix for
  LP: #310575).
* debian/patches/pdftops-cups-1.4.dpatch: Updated from CUPS 1.4 SVN. Contains
  fixes for multiple-page-size document printing (partial fix for
  LP: #310575).
* debian/patches/pdftops-dont_fail_on_cancel.dpatch: Removed, should be
  fixed in the new upstream version of pdftops.

[ Martin Pitt ]
* debian/patches/pdftops-cups-1.4.dpatch: Add definition of
  HAVE_PDFTOPS and CUPS_PDFTOPS, so that the filter actually gets
  again built with pdftops support. (Fixes Till's change from above).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * "$Id: request.c 7296 2008-02-12 00:20:32Z mike $"
 
2
 * "$Id: request.c 7947 2008-09-16 23:37:56Z mike $"
3
3
 *
4
4
 *   IPP utilities for the Common UNIX Printing System (CUPS).
5
5
 *
123
123
  http_status_t expect;                 /* Expect: header to use */
124
124
 
125
125
 
126
 
  DEBUG_printf(("cupsDoFileRequest(%p, %p, \'%s\', \'%s\')\n",
127
 
                http, request, resource ? resource : "(null)",
128
 
                filename ? filename : "(null)"));
 
126
  DEBUG_printf(("cupsDoFileRequest(%p, %p, \'%s\', %d, %d)\n",
 
127
                http, request, resource ? resource : "(null)", infile,
 
128
                outfile));
129
129
 
130
130
  if (http == NULL || request == NULL || resource == NULL)
131
131
  {
198
198
 
199
199
  while (response == NULL)
200
200
  {
201
 
    DEBUG_puts("cupsDoFileRequest: setup...");
 
201
    DEBUG_puts("cupsDoIORequest: setup...");
202
202
 
203
203
   /*
204
204
    * Setup the HTTP variables needed...
221
221
    httpSetField(http, HTTP_FIELD_AUTHORIZATION, http->authstring);
222
222
    httpSetExpect(http, expect);
223
223
 
224
 
    DEBUG_printf(("cupsDoFileRequest: authstring=\"%s\"\n", http->authstring));
 
224
    DEBUG_printf(("cupsDoIORequest: authstring=\"%s\"\n", http->authstring));
225
225
 
226
226
   /*
227
227
    * Try the request...
228
228
    */
229
229
 
230
 
    DEBUG_puts("cupsDoFileRequest: post...");
 
230
    DEBUG_puts("cupsDoIORequest: post...");
231
231
 
232
232
    if (httpPost(http, resource))
233
233
    {
244
244
    * Send the IPP data...
245
245
    */
246
246
 
247
 
    DEBUG_puts("cupsDoFileRequest: ipp write...");
 
247
    DEBUG_puts("cupsDoIORequest: ipp write...");
248
248
 
249
249
    request->state = IPP_IDLE;
250
250
    status         = HTTP_CONTINUE;
275
275
 
276
276
    if (status == HTTP_CONTINUE && state == IPP_DATA && infile >= 0)
277
277
    {
278
 
      DEBUG_puts("cupsDoFileRequest: file write...");
 
278
      DEBUG_puts("cupsDoIORequest: file write...");
279
279
 
280
280
     /*
281
281
      * Send the file...
303
303
    * Get the server's return status...
304
304
    */
305
305
 
306
 
    DEBUG_puts("cupsDoFileRequest: update...");
 
306
    DEBUG_puts("cupsDoIORequest: update...");
307
307
 
308
308
    while (status == HTTP_CONTINUE)
309
309
      status = httpUpdate(http);
310
310
 
311
 
    DEBUG_printf(("cupsDoFileRequest: status = %d\n", status));
 
311
    DEBUG_printf(("cupsDoIORequest: status = %d\n", status));
312
312
 
313
313
    if (status == HTTP_UNAUTHORIZED)
314
314
    {
315
 
      DEBUG_puts("cupsDoFileRequest: unauthorized...");
 
315
      DEBUG_puts("cupsDoIORequest: unauthorized...");
316
316
 
317
317
     /*
318
318
      * Flush any error message...
337
337
    }
338
338
    else if (status == HTTP_ERROR)
339
339
    {
340
 
      DEBUG_printf(("cupsDoFileRequest: http->error=%d (%s)\n", http->error,
 
340
      DEBUG_printf(("cupsDoIORequest: http->error=%d (%s)\n", http->error,
341
341
                    strerror(http->error)));
342
342
 
343
343
#ifdef WIN32
381
381
    }
382
382
    else if (status != HTTP_OK)
383
383
    {
384
 
      DEBUG_printf(("cupsDoFileRequest: error %d...\n", status));
 
384
      DEBUG_printf(("cupsDoIORequest: error %d...\n", status));
385
385
 
386
386
     /*
387
387
      * Flush any error message...
396
396
      * Read the response...
397
397
      */
398
398
 
399
 
      DEBUG_puts("cupsDoFileRequest: response...");
 
399
      DEBUG_puts("cupsDoIORequest: response...");
400
400
 
401
401
      response = ippNew();
402
402
 
476
476
              ipp_t      *request,      /* I - IPP request */
477
477
              const char *resource)     /* I - HTTP resource for POST */
478
478
{
479
 
  return (cupsDoFileRequest(http, request, resource, NULL));
 
479
  return (cupsDoIORequest(http, request, resource, -1, -1));
480
480
}
481
481
 
482
482
 
553
553
 
554
554
 
555
555
/*
556
 
 * End of "$Id: request.c 7296 2008-02-12 00:20:32Z mike $".
 
556
 * End of "$Id: request.c 7947 2008-09-16 23:37:56Z mike $".
557
557
 */