After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 302976 - Can't change IP address for an HP Jetdirect printer
Can't change IP address for an HP Jetdirect printer
Status: RESOLVED FIXED
Product: gnome-cups-manager
Classification: Deprecated
Component: gnome-cups-manager
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
: 156886 171813 172670 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-05-04 11:20 UTC by Sebastien Bacher
Modified: 2008-01-29 13:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix the problem with the changing of the driver's URI (1003 bytes, patch)
2005-09-29 15:53 UTC, Julien Olivier
committed Details | Review

Description Sebastien Bacher 2005-05-04 11:20:10 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."
Comment 1 Julien Olivier 2005-09-29 13:59:04 UTC
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 ?
Comment 2 Julien Olivier 2005-09-29 14:24:06 UTC
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 :)
Comment 3 Julien Olivier 2005-09-29 15:53:14 UTC
Created attachment 52815 [details] [review]
patch to fix the problem with the changing of the driver's URI
Comment 4 Jody Goldberg 2005-09-29 16:00:27 UTC
doh!
Comment 5 Jody Goldberg 2005-10-04 15:27:15 UTC
*** Bug 172670 has been marked as a duplicate of this bug. ***
Comment 6 Jody Goldberg 2005-10-04 15:27:30 UTC
*** Bug 171813 has been marked as a duplicate of this bug. ***
Comment 7 Jody Goldberg 2005-10-04 15:27:50 UTC
*** Bug 156886 has been marked as a duplicate of this bug. ***
Comment 8 Kjartan Maraas 2006-01-08 16:34:11 UTC
Commiting this since it was never commited to CVS.
Comment 9 Kjartan Maraas 2008-01-29 13:10:39 UTC
Moving all gnome-cups-manager bugs to new product. Filter on Kjartan's spring cleaning.