Bug 435080 - CUPS backend should check for DEVICE_URI in environment
Summary: CUPS backend should check for DEVICE_URI in environment
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: bluez-utils
Version: 8
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: David Woodhouse
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-02-27 09:12 UTC by Tim Waugh
Modified: 2008-03-13 17:55 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-03-13 17:55:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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