Bug 543986 - Setting of more Browse Servers in Advanced Server Settings is saved wrong
Summary: Setting of more Browse Servers in Advanced Server Settings is saved wrong
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-printer
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-03 16:26 UTC by Jiri Popelka
Modified: 2009-12-10 04:09 UTC (History)
2 users (show)

Fixed In Version: 1.1.15-6.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-12-10 04:05:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jiri Popelka 2009-12-03 16:26:33 UTC
Description of problem:
When I set more *different* Browse Servers in Advanced Server Settings 
dialog and pres OK, more *same* servers are written into cupsd.conf

Version-Release number of selected component (if applicable):
F-10:
system-config-printer-1.1.13-3.fc10.i386
cups-1.3.10-5.fc10.i386
F-12:
system-config-printer-1.1.15-1.fc12.x86_64
cups-1.4.2-7.fc12.x86_64


How reproducible:
always

Steps to Reproduce:
1. Server -> Settings -> Advanced...
2. Add 2 *different* servers in Browse servers
3. Ok -> Ok
4. Shut down s-c-p
5. Look into cupsd.conf 
  
Actual results:
Settings are correctly written to cupsd.conf.0
but in cupsd.conf there are two *same* BrowsePoll directives.

Expected results:
There are two *different* BrowsePoll directives in cupsd.conf

Additional info:
When I manually set more BrowsePoll lines in cupsd.conf, they
are correctly read into Advanced Server Settings dialog


Problems may likely be with cupsAdminGetServerSettings() (cups/adminutil.c),
which is called by cups.adminGetServerSettings() (pycups/cupsconnection.c).

cupsAdminGetServerSettings() (cups/adminutil.c)
returns only one BrowsePoll directive value even there are more BrowsePoll directive lines in cupsd.conf
(try cups/testadmin program)

cups.adminGetServerSettings()  (pycups/cupsconnection.c),
returns dictionary of string:string so it can have only one BrowsePoll key with one string value

CUPS probably doesn't use cupsAdminGetServerSettings() for reading of BrowsePoll
directive(s) from cupsd.conf because multiple BrowsePoll directives are obviously working right (see /var/log/cups/error_log | grep cups-polld)

See more about BrowsePoll directive in
http://www.cups.org/documentation.php/doc-1.4/sharing.html

Comment 1 Tim Waugh 2009-12-03 17:17:35 UTC
Thanks.

I've changed the code so that instead of taking what we got from GetServerSettings and adjusting it, we start with an empty dict() and set the things we want to change.  SetServerSettings will leave the other settings alone then.

(Will not be fixed in Fedora 10.)

Looks like we definitely have to parse cupsd.conf in order to configure BrowsePoll servers then.  OK, never mind. ;-)

Comment 2 Fedora Update System 2009-12-04 23:54:34 UTC
system-config-printer-1.1.15-3.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update system-config-printer'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-10893

Comment 3 Fedora Update System 2009-12-04 23:58:16 UTC
system-config-printer-1.1.15-3.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update system-config-printer'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-12094

Comment 4 Fedora Update System 2009-12-10 04:04:26 UTC
system-config-printer-1.1.15-6.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2009-12-10 04:07:58 UTC
system-config-printer-1.1.15-6.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.