printing: Fill device URI for non-Avahi printers
authorMarek Kasik <mkasik@redhat.com>
Fri, 13 Dec 2019 16:52:21 +0000 (17:52 +0100)
committerMarek Kasik <mkasik@redhat.com>
Fri, 13 Dec 2019 16:53:14 +0000 (17:53 +0100)
Device URI was not filled for non-Avahi printers by my previous commit.
I've added it back. It was a mistake during rebasing of the patch
to current master.

modules/printbackends/gtkprintbackendcups.c

index db8a985d825efb4cec5919b1dea996e58d1cfe1a..99d421f224083d7ed5bb04d46d2f16cb19f95d68 100644 (file)
@@ -2413,6 +2413,11 @@ cups_create_printer (GtkPrintBackendCups *cups_backend,
       cups_printer->device_uri = g_strdup_printf ("/%s",
                                                   info->avahi_resource_path);
     }
+  else
+    {
+      cups_printer->device_uri = g_strdup_printf ("/printers/%s",
+                                                  info->printer_name);
+    }
 
   /* Check to see if we are looking at a class */
   if (info->member_uris)