GNOME Bugzilla – Bug 302976
Can't change IP address for an HP Jetdirect printer
Last modified: 2008-01-29 13:10:39 UTC
This bug has been opened here: https://bugzilla.ubuntu.com/9162 "I've set up a network printer using the HP JetDirect method, and set up its IP in the "host" field. Later on, the IP address of the printer changed, and I opened the printer properties again. Then, I could change the IP address in the "host" field, but closing the window and opening it again showed that the former value had been kept. The only solution was to delete the printer and re-create it."
The problem seems to be here: ipp_t *request = gnome_cups_request_new_for_printer (CUPS_ADD_PRINTER, printer); ippAddString (request, IPP_TAG_PRINTER, IPP_TAG_NAME, "device-uri", NULL, gnome_cups_strdup (uri)); gnome_cups_request_execute_async (request, NULL, "/admin/", NULL, NULL, NULL); Shouldn't it be IPP_SET_PRINTER_ATTRIBUTES instead of CUPS_ADD_PRINTER ? And shouldn't it be IPP_TAG_URI instead of IPP_TAG_NAME ? Also, if I execute gnome_cups_printer_get_device_uri (printer) just before that (using the same "printer" pointer), it returns an empty string. I've tried to make it work myself, but it doesn't work. Any hint ?
OK, I found something: in gnome-cups-manager/printer-properties.c line 625: g_signal_connect_object (cs, "changed", G_CALLBACK (cb_connection_changed), xml, 0); should be replaced by: g_signal_connect_object (cs, "changed", G_CALLBACK (cb_connection_changed), printer, 0); That explains why executing gnome_cups_printer_get_device_uri (printer) insinde cb_connection_changed didn't work: printer was, actually, xml. Now, I just have to figure out how to tell gnome_cups to change the device-uri :)
Created attachment 52815 [details] [review] patch to fix the problem with the changing of the driver's URI
doh!
*** Bug 172670 has been marked as a duplicate of this bug. ***
*** Bug 171813 has been marked as a duplicate of this bug. ***
*** Bug 156886 has been marked as a duplicate of this bug. ***
Commiting this since it was never commited to CVS.
Moving all gnome-cups-manager bugs to new product. Filter on Kjartan's spring cleaning.