+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: t -*-*/
+
/***
Copyright 2009 Lennart Poettering
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);
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: t -*-*/
+
#ifndef fooreservemonitorhfoo
#define fooreservemonitorhfoo
#include <dbus/dbus.h>
#include <inttypes.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct rm_monitor rm_monitor;
/* Prototype for a function that is called whenever the reservation
* userdata was set. */
void* rm_get_userdata(rm_monitor *m);
+#ifdef __cplusplus
+}
+#endif
+
#endif
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: t -*-*/
+
/***
Copyright 2009 Lennart Poettering
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: t -*-*/
+
#ifndef fooreservehfoo
#define fooreservehfoo
#include <dbus/dbus.h>
#include <inttypes.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct rd_device rd_device;
/* Prototype for a function that is called whenever someone else wants
* userdata was set. */
void* rd_get_userdata(rd_device *d);
+#ifdef __cplusplus
+}
+#endif
+
#endif