reserve: update from upstream git repo

This commit is contained in:
Lennart Poettering 2009-07-01 20:20:36 +02:00
parent 5d4769b7dd
commit efdd3d054b
4 changed files with 33 additions and 1 deletions

View file

@ -1,3 +1,5 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: t -*-*/
/***
Copyright 2009 Lennart Poettering
@ -76,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);