Bug 435080

Summary: CUPS backend should check for DEVICE_URI in environment
Product: [Fedora] Fedora Reporter: Tim Waugh <twaugh>
Component: bluez-utilsAssignee: David Woodhouse <dwmw2>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8CC: bnocera
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-13 17:55:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tim Waugh 2008-02-27 09:12:50 UTC
Description of problem:
This could be better:

if (strncasecmp(argv[0], "bluetooth://", 12)) {
  fprintf(stderr, "ERROR: No device URI found\n");
  return 1;
}

It should do something like this instead:

char *uri = getenv ("DEVICE_URI");
if (uri == NULL)
  uri == argv[0]
if (strncasecmp(uri, "bluetooth://", 12)) {
...

Version-Release number of selected component (if applicable):
3.20-6.fc8

Comment 1 Tim Waugh 2008-02-27 10:24:45 UTC
In fact, it could even do this:

#include <cups/backend.h>
...
const char *uri = cupsBackendDeviceURI (argv);
if (strncasecmp(uri, "bluetooth://, 12)) {
...


Comment 2 Bastien Nocera 2008-03-13 17:55:07 UTC
Fixed upstream. Should be in 3.29.