]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - backend/ipp.c
Load cups into easysw/current.
[thirdparty/cups.git] / backend / ipp.c
index c7d647d141450f46bdc96445821b58670143987d..3cc342f2cfdf68c1ca5e08f66957c922c995d483 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: ipp.c 6318 2007-03-06 04:36:55Z mike $"
+ * "$Id: ipp.c 6365 2007-03-19 20:56:57Z mike $"
  *
  *   IPP backend for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -521,6 +521,9 @@ main(int  argc,                             /* I - Number of command-line args */
 
     if ((http = httpConnectEncrypt(hostname, port, cupsEncryption())) == NULL)
     {
+      if (job_cancelled)
+       break;
+
       if (getenv("CLASS") != NULL)
       {
        /*
@@ -567,10 +570,21 @@ main(int  argc,                           /* I - Number of command-line args */
        perror("ERROR: Unable to connect to IPP host");
        sleep(30);
       }
+
+      if (job_cancelled)
+       break;
     }
   }
   while (http == NULL);
 
+  if (job_cancelled)
+  {
+    if (argc == 6 || strcmp(filename, argv[6]))
+      unlink(filename);
+
+    return (CUPS_BACKEND_FAILED);
+  }
+
   fputs("STATE: -connecting-to-device\n", stderr);
   fprintf(stderr, "INFO: Connected to %s...\n", hostname);
 
@@ -1667,5 +1681,5 @@ sigterm_handler(int sig)          /* I - Signal */
 
 
 /*
- * End of "$Id: ipp.c 6318 2007-03-06 04:36:55Z mike $".
+ * End of "$Id: ipp.c 6365 2007-03-19 20:56:57Z mike $".
  */