]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Update cups-driverd and spec-ipp to be consistent about supporting name(255)
authorMichael R Sweet <michaelrsweet@gmail.com>
Mon, 8 Aug 2016 16:20:01 +0000 (12:20 -0400)
committerMichael R Sweet <michaelrsweet@gmail.com>
Mon, 8 Aug 2016 16:20:01 +0000 (12:20 -0400)
values for the "ppd-name" attribute (PR #4860)

CHANGES.txt
doc/help/spec-ipp.html
scheduler/cups-driverd.cxx

index 194eb2e5b0cde15171aa5bbe76e8ce3f4ebc939c..5ff3f8c792a7b1d77f3ca8e42a82e32cf32e0d8c 100644 (file)
@@ -1,4 +1,4 @@
-CHANGES.txt - 2.2rc1 - 2016-07-19
+CHANGES.txt - 2.2rc1 - 2016-08-08
 ---------------------------------
 
 CHANGES IN CUPS V2.2rc1
@@ -9,6 +9,8 @@ CHANGES IN CUPS V2.2rc1
          print job with no errors (Issue #4851)
        - The CUPS-Add-Modify-Class and CUPS-Add-Modify-Printer operations did
          not always return an error for failed adds (Issue #4854)
+       - PPD files with names longer than 127 bytes did not work (PR #4860)
+       - Updated localizations (PR #4858)
 
 
 CHANGES IN CUPS V2.2b2
index 724695a597d8cf4e3e65ca7fef6babb8816fdf88..0dd2dc4975fcf5328e3668ed8e3f610eb9da8863 100644 (file)
@@ -587,7 +587,7 @@ name='CREATE_PRINTER_SUBSCRIPTION'>Create-Printer-Subscription</a></h3>
 
        <dd>The client OPTIONALLY supplies a port monitor name for the specified printer.
 
-       <dt>"ppd-name" (name(127)):
+       <dt>"ppd-name" (name(255)):
 
        <dd>The client OPTIONALLY supplies a PPD name for the specified printer.
 
index b6592a6aae3bee61edb76314c8356bd772339660..9607169111af6419830da9019f23ecd35772f0f9 100644 (file)
@@ -31,7 +31,7 @@
  * Constants...
  */
 
-#define PPD_SYNC       0x50504438      /* Sync word for ppds.dat (PPD8) */
+#define PPD_SYNC       0x50504439      /* Sync word for ppds.dat (PPD9) */
 #define PPD_MAX_LANG   32              /* Maximum languages */
 #define PPD_MAX_PROD   32              /* Maximum products */
 #define PPD_MAX_VERS   32              /* Maximum versions */
@@ -75,7 +75,7 @@ typedef struct                                /**** PPD record ****/
   int          model_number;           /* cupsModelNumber */
   int          type;                   /* ppd-type */
   char         filename[512],          /* Filename */
-               name[512],              /* PPD name */
+               name[256],              /* PPD name */
                languages[PPD_MAX_LANG][6],
                                        /* LanguageVersion/cupsLanguages */
                products[PPD_MAX_PROD][128],
@@ -1719,7 +1719,7 @@ load_drivers(cups_array_t *include,       /* I - Drivers to include */
   char         *argv[3],               /* Arguments for command */
                filename[1024],         /* Name of driver */
                line[2048],             /* Line from driver */
-               name[512],              /* ppd-name */
+               name[256],              /* ppd-name */
                make[128],              /* ppd-make */
                make_and_model[128],    /* ppd-make-and-model */
                device_id[256],         /* ppd-device-id */
@@ -1852,7 +1852,7 @@ load_drivers(cups_array_t *include,       /* I - Drivers to include */
        psversion[0] = '\0';
        strlcpy(type_str, "postscript", sizeof(type_str));
 
-        if (sscanf(line, "\"%511[^\"]\"%127s%*[ \t]\"%127[^\"]\""
+        if (sscanf(line, "\"%255[^\"]\"%127s%*[ \t]\"%127[^\"]\""
                         "%*[ \t]\"%127[^\"]\"%*[ \t]\"%255[^\"]\""
                         "%*[ \t]\"%127[^\"]\"%*[ \t]\"%127[^\"]\""
                         "%*[ \t]\"%127[^\"]\"",
@@ -2383,7 +2383,7 @@ load_ppds(const char *d,          /* I - Actual directory */
   char         filename[1024],         /* Name of PPD or directory */
                line[256],              /* Line from file */
                *ptr,                   /* Pointer into name */
-               name[128];              /* Name of PPD file */
+               name[256];              /* Name of PPD file */
   ppd_info_t   *ppd,                   /* New PPD file */
                key;                    /* Search key */