summaryrefslogtreecommitdiffstats
path: root/network/server.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-10-22 20:19:53 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-10-22 20:19:53 +0000
commitc95ffdc65e97a75e65dbbd22e7fae7086346595e (patch)
tree16f35bf85b914303d03cd3264b587489bec711be /network/server.c
parent723ff52c61b23cfaac0293b9d5a206f8df94396e (diff)
Fixes cross storage and adapter path.
Diffstat (limited to 'network/server.c')
-rw-r--r--network/server.c5
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);