From: Michael R Sweet Date: Tue, 16 Jul 2019 14:43:01 +0000 (-0400) Subject: Don't default printer-info, printer-location, printer-geo-location (Issue #5603) X-Git-Tag: v2.3.0~27 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fcups.git;a=commitdiff_plain;h=614efb7a87f1dd4626e158709944f9e649fea0ba Don't default printer-info, printer-location, printer-geo-location (Issue #5603) --- diff --git a/CHANGES.md b/CHANGES.md index b50b318f0..9595a8077 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 diff --git a/scheduler/printers.c b/scheduler/printers.c index 3fb46dc89..75ef4c0d2 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -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")) {