diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-10-31 23:05:49 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-10-31 23:05:49 +0100 |
commit | 795dd43cceb73cbc1e76592edfc26c093517f4e6 (patch) | |
tree | 6d7f44a5ef2a6db762e3cadf361fc9005c51dac1 /src | |
parent | 139c2014be451848fcc3fa31cdc07653148f596e (diff) |
Move storage of the base path to manager
Diffstat (limited to 'src')
-rw-r--r-- | src/adapter.c | 3 | ||||
-rw-r--r-- | src/manager.c | 7 | ||||
-rw-r--r-- | src/manager.h | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/adapter.c b/src/adapter.c index 23a59c09..c10b24f3 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -71,8 +71,6 @@ #define check_address(address) bachk(address) -static char base_path[] = "/org/bluez"; - static DBusConnection *connection = NULL; static GSList *adapter_drivers = NULL; @@ -2766,6 +2764,7 @@ struct btd_adapter *adapter_create(DBusConnection *conn, int id) { char path[MAX_PATH_LENGTH]; struct btd_adapter *adapter; + const char *base_path = manager_get_base_path(); if (!connection) connection = conn; diff --git a/src/manager.c b/src/manager.c index 49118ec7..c42a7c96 100644 --- a/src/manager.c +++ b/src/manager.c @@ -48,10 +48,17 @@ #include "error.h" #include "manager.h" +static char base_path[50] = "/org/bluez"; + static DBusConnection *connection = NULL; static int default_adapter_id = -1; static GSList *adapters = NULL; +const char *manager_get_base_path(void) +{ + return base_path; +} + int manager_update_adapter(uint16_t dev_id) { struct btd_adapter *adapter; diff --git a/src/manager.h b/src/manager.h index f70bb524..d0e30a89 100644 --- a/src/manager.h +++ b/src/manager.h @@ -27,6 +27,7 @@ dbus_bool_t manager_init(DBusConnection *conn, const char *path); void manager_cleanup(DBusConnection *conn, const char *path); +const char *manager_get_base_path(void); struct btd_adapter *manager_find_adapter(const bdaddr_t *sba); struct btd_adapter *manager_find_adapter_by_path(const char *path); struct btd_adapter *manager_find_adapter_by_id(int id); |