summaryrefslogtreecommitdiff
path: root/cups
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2019-11-14 13:00:12 -0500
committerMichael R Sweet <michael.r.sweet@gmail.com>2019-11-14 13:00:12 -0500
commit3ff5a8e3932907c5794165b27ecefa1e8d7b1321 (patch)
tree99353b5756fb595b7ce940c7c4fcb7c518fdac26 /cups
parentbea505c32e49316ffca229107e8abf6fd9ea38dd (diff)
downloadcups-3ff5a8e3932907c5794165b27ecefa1e8d7b1321.tar.gz
Fix lpoptions defaults (Issue #5681)
Diffstat (limited to 'cups')
-rw-r--r--cups/dest.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/cups/dest.c b/cups/dest.c
index 17d96fe4a..6ddfe9a36 100644
--- a/cups/dest.c
+++ b/cups/dest.c
@@ -3482,6 +3482,16 @@ cups_enum_dests(
data.num_dests = cups_get_dests(filename, NULL, NULL, 1, user_default != NULL, data.num_dests, &data.dests);
}
+ if (!data.def_name[0] && (user_dest = cupsGetDest(NULL, NULL, data.num_dests, data.dests)) != NULL)
+ {
+ /*
+ * Use an lpoptions default printer...
+ */
+
+ strlcpy(data.def_name, user_dest->name, sizeof(data.def_name));
+ data.def_instance = user_dest->instance;
+ }
+
/*
* Get ready to enumerate...
*/