Bug 1771500 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

0. stop cups-browsed service:
```
systemctl stop cups-browsed
```
1. Create multiple virtual printers on network (the ppd file has to be valid file):
```
sudo ippeveprinter -D file:/tmp/ps -P /usr/share/ppd/cupsfilters/Generic-PDF_Printer-PDF.ppd -c /usr/bin/cat "local_printer10"
```
2. Open print dialog
3. Only `Save to PDF` and local printers are available to choose from. Sometimes first network connected printer shows up.

The GTK dialog shows all the printers, libreoofice too (it has a own print dialog as Firefox has).

The problem is most likely with `CupsDestCallback`: https://searchfox.org/mozilla-central/source/widget/nsPrinterListCUPS.cpp#85
To continue enumerate all the printers it should return 1. For my case it returns 0, because the CUPS_DEST_FLAGS_MORE is not set. I think it is because some of the printers use `ipps ` and other `ipp`:
```
avahi-browse -a|grep ipp                                                                                                                                                      15:33:09
+ wlp3s0 IPv6 local_printer10                               _ipps._tcp           local
+ wlp3s0 IPv6 local_printer9                                _ipps._tcp           local
+ wlp3s0 IPv4 local_printer9                                _ipps._tcp           local
+ wlp3s0 IPv4 local_printer10                               _ipps._tcp           local
+ wlp3s0 IPv6 local_printer10                               _ipp._tcp            local
+ wlp3s0 IPv6 local_printer9                                _ipp._tcp            local
+ wlp3s0 IPv4 Brother DCP-L2540DN series                    _ipp._tcp            local
+ wlp3s0 IPv4 local_printer10                               _ipp._tcp            local
+ wlp3s0 IPv4 local_printer9                                _ipp._tcp            local
```
I get the `local_printer10` in the list sometimes and sometimes `Brother DCP-L2540DN`. So we should probably always return 1, because cups will handle the right iteration count for us.
0. stop cups-browsed service:
```
systemctl stop cups-browsed
```
1. Create multiple virtual printers on network (the ppd file has to be valid file):
```
sudo ippeveprinter -D file:/tmp/ps -P /usr/share/ppd/cupsfilters/Generic-PDF_Printer-PDF.ppd -c /usr/bin/cat "local_printer10"
```
2. Open print dialog
3. Only `Save to PDF` and one of the network or local printer is available to choose from.

The GTK dialog shows all the printers, libreoofice too (it has a own print dialog as Firefox has).

The problem is most likely with `CupsDestCallback`: https://searchfox.org/mozilla-central/source/widget/nsPrinterListCUPS.cpp#85
To continue enumerate all the printers it should return 1. For my case it returns 0, because the CUPS_DEST_FLAGS_MORE is not set. I think it is because some of the printers use `ipps ` and other `ipp`:
```
avahi-browse -a|grep ipp                                                                                                                                                      15:33:09
+ wlp3s0 IPv6 local_printer10                               _ipps._tcp           local
+ wlp3s0 IPv6 local_printer9                                _ipps._tcp           local
+ wlp3s0 IPv4 local_printer9                                _ipps._tcp           local
+ wlp3s0 IPv4 local_printer10                               _ipps._tcp           local
+ wlp3s0 IPv6 local_printer10                               _ipp._tcp            local
+ wlp3s0 IPv6 local_printer9                                _ipp._tcp            local
+ wlp3s0 IPv4 Brother DCP-L2540DN series                    _ipp._tcp            local
+ wlp3s0 IPv4 local_printer10                               _ipp._tcp            local
+ wlp3s0 IPv4 local_printer9                                _ipp._tcp            local
```
I get the `local_printer10` in the list sometimes and sometimes `Brother DCP-L2540DN`. So we should probably always return 1, because cups will handle the right iteration count for us.

Back to Bug 1771500 Comment 0