diff options
Diffstat (limited to 'reserve-monitor.c')
-rw-r--r-- | reserve-monitor.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/reserve-monitor.c b/reserve-monitor.c index 39cb620..9f60201 100644 --- a/reserve-monitor.c +++ b/reserve-monitor.c @@ -78,9 +78,17 @@ static DBusHandlerResult filter_handler( goto invalid; if (strcmp(name, m->service_name) == 0) { - m->busy = !!(new && *new); + /* If we ourselves own the device, then don't consider this 'busy' */ + if (m->busy) { + const char *un; + + if ((un = dbus_bus_get_unique_name(c))) + if (strcmp(new, un) == 0) + m->busy = FALSE; + } + if (m->change_cb) { m->ref++; m->change_cb(m); |