core::dbus::Service constructor ignores return value of dbus_request_name(), hiding failures

Bug #1329211 reported by James Henstridge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dbus-cpp
Fix Released
High
Thomas Voß
dbus-cpp (Ubuntu)
Fix Released
Undecided
Thomas Voß

Bug Description

The core::dbus::Service constructor ignores the return value of dbus_bus_request_name(). This means that a service might start but never be able to handle any method calls because its well known name is owned by someone else.

When used with the core::dbus::Skeleton type, the name request flags are do_not_queue and replace_existing. Looking at the libdbus API docs here:

http://dbus.freedesktop.org/doc/api/html/group__DBusBus.html#ga8a9024c78c4ea89b6271f19dbc7861b2

The function could return one of:

 * DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER
 * DBUS_REQUEST_NAME_REPLY_EXISTS
 * DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER

The "exists" response should probably be treated as an error.

Related branches

Changed in dbus-cpp:
status: New → Confirmed
status: Confirmed → In Progress
importance: Undecided → High
assignee: nobody → Thomas Voß (thomas-voss)
Changed in dbus-cpp (Ubuntu):
assignee: nobody → Thomas Voß (thomas-voss)
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dbus-cpp - 4.0.0+14.10.20140730-0ubuntu1

---------------
dbus-cpp (4.0.0+14.10.20140730-0ubuntu1) utopic; urgency=low

  [ Ubuntu daily release ]
  * debian/libdbus-cpp4.symbols.32bit: auto-update to released version
  * debian/libdbus-cpp4.symbols.64bit: auto-update to released version

  [ thomas-voss ]
  * Make sure that dbus daemon instances fired up for testing are torn
    down after a configurable timeout. (LP: #1326200)
  * Make sure that core::dbus::Service::Service(...) interprets return
    values of dbus_bus_request_name correctly. (LP: #1329211)
 -- Ubuntu daily release <email address hidden> Wed, 30 Jul 2014 16:12:30 +0000

Changed in dbus-cpp (Ubuntu):
status: In Progress → Fix Released
Changed in dbus-cpp:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.