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

Device URIs are not stable between releases #3259

Closed
michaelrsweet opened this issue Jul 13, 2009 · 4 comments
Closed

Device URIs are not stable between releases #3259

michaelrsweet opened this issue Jul 13, 2009 · 4 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.4rc1
CUPS.org User: twaugh.redhat

Some devices are given different device URIs in 1.4rc1 from the ones they were assigned in CUPS 1.3.10. For example:

usb:https://Lexmark/Lexmark%20E120 (1.4rc1)
usb:https://Lexmark/E120 (1.3.10)

Is this intentional? If so, the usb backend (for instance) ought to continue to accept the older-style device URIs.

The particular change that gave rise to this difference is subversion revision 7584.

Original bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=507244
(showing that the correct device URI is now 'usb:https://Lexmark/Lexmark%20E120')

Other supporting evidence:
http:https://bbs.archlinux.org/viewtopic.php?id=64074
(showing that the correct device URI was once 'usb:https://Lexmark/E120')

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

For the same backend it shouldn't change, however 1.4 now defaults to the libusb-based backend on Linux which may get different information than the old kernel printer device...

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: twaugh.redhat

Sorry, I should have said: I am not using libusb in my configuration at the moment. This is just about the change in the way the device URI is constructed from the IEEE 1284 Device ID, in the function backendGetDeviceID().

The old behaviour was to strip the manufacturer name from the model name if it appeared there (e.g. if we had 'MFG:Lexmark' and 'MDL:Lexmark E120' we'd have scheme:https://Lexmark/E120).

The new behaviour is to use the Device ID fields exactly as they are for the purposes of creating a device URI, e.g. scheme:https://Lexmark/Lexmark%20E120.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet
Copy link
Collaborator Author

"str3259.patch":

Index: backend/ieee1284.c

--- backend/ieee1284.c (revision 8751)
+++ backend/ieee1284.c (working copy)
@@ -306,6 +306,14 @@
mfg = temp;
}

  • if (!strncasecmp(mdl, mfg, strlen(mfg)))
  • {
  •  mdl += strlen(mfg);
    
  •  while (isspace(*mdl & 255))
    
  •    mdl ++;
    
  • }

/*

  • Generate the device URI from the manufacturer, make_model, and
  • serial number strings.

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