]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Don't default printer-info, printer-location, printer-geo-location (Issue #5603)
authorMichael R Sweet <michael.r.sweet@gmail.com>
Tue, 16 Jul 2019 14:43:01 +0000 (10:43 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Tue, 16 Jul 2019 14:43:01 +0000 (10:43 -0400)
CHANGES.md
scheduler/printers.c

index b50b318f0115e588ed6b2a116c705144161e0b5f..9595a8077818a214d4727eb5149d6f03026855d5 100644 (file)
@@ -12,6 +12,8 @@ Changes in CUPS v2.3.0
 - Removed dead code from the scheduler (Issue #5593)
 - "make" failed with GZIP options (Issue #5595)
 - Fixed a NULL pointer dereference bug in `httpGetSubField2` (Issue #5598)
+- The scheduler no longer provides a default value for the description
+  (Issue #5603)
 - The scheduler now logs jobs held for authentication using the error level so
   it is clear what happened (Issue #5604)
 - The `lpadmin` command did not always update the PPD file for changes to the
index 3fb46dc8910829ed30b833c5e65df3483b26b468..75ef4c0d2bd8c665d742c9fe480be99644c8d157 100644 (file)
@@ -1072,8 +1072,7 @@ cupsdLoadAllPrinters(void)
     }
     else if (!_cups_strcasecmp(line, "Info"))
     {
-      if (value)
-       cupsdSetString(&p->info, value);
+      cupsdSetString(&p->info, value ? value : "");
     }
     else if (!_cups_strcasecmp(line, "MakeModel"))
     {
@@ -1082,23 +1081,19 @@ cupsdLoadAllPrinters(void)
     }
     else if (!_cups_strcasecmp(line, "Location"))
     {
-      if (value)
-       cupsdSetString(&p->location, value);
+      cupsdSetString(&p->location, value ? value : "");
     }
     else if (!_cups_strcasecmp(line, "GeoLocation"))
     {
-      if (value)
-        cupsdSetString(&p->geo_location, value);
+      cupsdSetString(&p->geo_location, value ? value : "");
     }
     else if (!_cups_strcasecmp(line, "Organization"))
     {
-      if (value)
-       cupsdSetString(&p->organization, value);
+      cupsdSetString(&p->organization, value ? value : "");
     }
     else if (!_cups_strcasecmp(line, "OrganizationalUnit"))
     {
-      if (value)
-       cupsdSetString(&p->organizational_unit, value);
+      cupsdSetString(&p->organizational_unit, value ? value : "");
     }
     else if (!_cups_strcasecmp(line, "DeviceURI"))
     {