Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add printer wizzard and auto-discoverred shows different list of printers #1774

Closed
michaelrsweet opened this issue Jun 13, 2006 · 8 comments
Closed
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.2-current
CUPS.org User: georgeliuyue

Reporting this problem only for cups-1.2svn-r5643
The auto-discovered list of printers and the list of printers in printer drop down box from add printer wizzard(APW) are not identical.

Some printer listed in APW's drop down list is not in the list auto-discover displays.

Some printers listed in auto-discovery page are shown as Unknown 123.456.789.123 in APW. (IP address is correct)

Have roughly 20 printers in my subnet.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Any printers with "Unknown" make and model strings are ignored on the main administration page for a couple reasons. First, we have no way to automatically select a driver. Second, some backends are either unable to report the make and model, like the serial backend, or are placeholders for particular drivers or backends.

Thus, the only printers that can be added automatically are reported, and the rest (including URI schemes like "ipp" and "socket") can be selected by clicking on Add Printer and doing all of the association manually.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

[post to cups.bugs]

There probably IS a memory accessing problem in CUPS 1.2.
Please keep this bug Open.

From Add Printer Wizzard (APW), some printers are listed as Unknown.
Those unknown printers have been auto-discovered (with valid manufacture
and model name)

Way to reproduce:

  1. Click Administration. A list a printers will be discovered.
  2. Click Add Printer, provide a name and examine the printer drop down
    box. (In many cases, there'll be printer named "Unknown". The unknown
    printers have been discovered in the previous step.)
  3. Click the back button to the main page of administration. Click Add
    Printer and check the printer list again. Printers of different IP
    addresses would be marked "Unknown". This list most likely is not the
    same as the printer in step 2.

I have roughly 20 printers in my subnet.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

It is highly unlikely there is a memory accessing problem (it would show up quickly in a lot of different places), but we'll need the full debug output of the SNMP backend to determine what is going wrong.

Please attach the output of the following commands:

CUPS_DEBUG_LEVEL=3 /usr/lib/cups/backend/snmp
lpinfo -l -v

Thanks!

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: georgeliuyue

Reproduced the problem on cups-1.2.x 5682, attached some debug files.

Attached png files shows a auto-discovery screen, which list all the printers in the subnet correctly.

After clicking "Add Printer", some "Unknown" printer showed up, but the Unknown printer's IP was previously shown in the auto-discovery screen, and printer name is known.

Made two runs of snmp backend and attached snmp.log and snmp.log1, each run returns different number of "Unknown" printers.

The unknown printer covers Ricoh and HP brand.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Hmm, will see if I can find a connection - both logs show the received packets, but in some cases we are ignoring the responses...

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Try the attached patch and let me know if it resolves the issue...

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: georgeliuyue

I applied the patch against CUPS-1.2svn-r5688, and the patch worked. This bug can be closed.

Thanks Mike.

@michaelrsweet
Copy link
Collaborator Author

"str1774.patch":

Index: snmp.c

--- snmp.c (revision 5731)
+++ snmp.c (working copy)
@@ -1203,7 +1203,7 @@
compare_cache(snmp_cache_t a, / I - First cache entry /
snmp_cache_t *b) /
I - Second cache entry */
{

  • return (a->address.ipv4.sin_addr.s_addr - b->address.ipv4.sin_addr.s_addr);
  • return (strcasecmp(a->addrname, b->addrname));
    }

@@ -1874,8 +1874,8 @@

  • Find a matching device in the cache...
    */
  • key.address = addr;
  • device = (snmp_cache_t *)cupsArrayFind(Devices, &key);
  • key.addrname = addrname;
  • device = (snmp_cache_t *)cupsArrayFind(Devices, &key);

/*

  • Process the message...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant