diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-10-22 20:19:53 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-10-22 20:19:53 +0000 |
commit | c95ffdc65e97a75e65dbbd22e7fae7086346595e (patch) | |
tree | 16f35bf85b914303d03cd3264b587489bec711be /network/server.c | |
parent | 723ff52c61b23cfaac0293b9d5a206f8df94396e (diff) |
Fixes cross storage and adapter path.
Diffstat (limited to 'network/server.c')
-rw-r--r-- | network/server.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/network/server.c b/network/server.c index dd4c816a..1622d102 100644 --- a/network/server.c +++ b/network/server.c @@ -848,7 +848,7 @@ static DBusHandlerResult enable(DBusConnection *conn, if (bacmp(&ns->src, BDADDR_ANY) == 0) { int dev_id; - dev_id = hci_get_route(NULL); + dev_id = hci_get_route(&ns->src); if ((dev_id < 0) || (hci_devba(dev_id, &ns->src) < 0)) return err_failed(conn, msg, "Adapter not available"); @@ -1170,6 +1170,9 @@ int server_register_from_file(const char *path, const bdaddr_t *src, struct network_server *ns; char *str; + if (!path) + return -EINVAL; + ns = g_new0(struct network_server, 1); bacpy(&ns->src, src); |