From: mike Date: Fri, 7 Feb 2003 12:03:43 +0000 (+0000) Subject: Check for and error out on IPP_NOT_FOUND errors... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3998b6923255f6ce09cf630d887e045a5a3173ef;p=thirdparty%2Fcups.git Check for and error out on IPP_NOT_FOUND errors... git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@3326 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/CHANGES.txt b/CHANGES.txt index 7e35c76e71..6b3b35f51f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,8 @@ CHANGES.txt - 02/05/2003 CHANGES IN CUPS V1.1.19 + - The IPP backend now detects if the destination queue + has gone away and reports an error. - The scheduler now allocates its select() sets to support larger numbers of clients on systems that support it. diff --git a/backend/ipp.c b/backend/ipp.c index 4579ef757f..fd41e64663 100644 --- a/backend/ipp.c +++ b/backend/ipp.c @@ -1,5 +1,5 @@ /* - * "$Id: ipp.c,v 1.72 2003/01/31 21:22:53 swdev Exp $" + * "$Id: ipp.c,v 1.73 2003/02/07 12:03:43 mike Exp $" * * IPP backend for the Common UNIX Printing System (CUPS). * @@ -402,9 +402,21 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ version = 0; httpReconnect(http); } + else if (ipp_status == IPP_NOT_FOUND) + { + fputs("ERROR: Destination printer does not exist!\n", stderr); + + if (supported) + ippDelete(supported); + + return (1); + } else + { fprintf(stderr, "ERROR: Unable to get printer status (%s)!\n", ippErrorString(ipp_status)); + sleep(10); + } if (supported) ippDelete(supported); @@ -1125,5 +1137,5 @@ run_pictwps_filter(char **argv, /* I - Command-line arguments */ /* - * End of "$Id: ipp.c,v 1.72 2003/01/31 21:22:53 swdev Exp $". + * End of "$Id: ipp.c,v 1.73 2003/02/07 12:03:43 mike Exp $". */