summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--network/connection.c1
-rw-r--r--network/manager.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/network/connection.c b/network/connection.c
index 03ee754d..610e1e84 100644
--- a/network/connection.c
+++ b/network/connection.c
@@ -458,7 +458,6 @@ static DBusHandlerResult connection_disconnect(DBusConnection *conn,
return DBUS_HANDLER_RESULT_HANDLED;
}
- close(nc->sk);
bnep_kill_connection(&nc->dst);
reply = dbus_message_new_method_return(msg);
diff --git a/network/manager.c b/network/manager.c
index ace1f602..1cbb9c70 100644
--- a/network/manager.c
+++ b/network/manager.c
@@ -414,9 +414,11 @@ static void default_adapter_reply(DBusPendingCall *call, void *data)
pr->adapter_path = g_strdup(adapter);
- if (pr->id == BNEP_SVC_PANU && (get_handles(pr, pan_handle_reply) < 0)) {
- err_failed(pr->conn, pr->msg, "D-Bus path registration failed");
- goto fail;
+ if (pr->addr) {
+ if (get_handles(pr, pan_handle_reply) < 0) {
+ err_failed(pr->conn, pr->msg, "D-Bus path registration failed");
+ goto fail;
+ }
} else if (get_address(pr, get_address_reply) < 0) {
err_failed(pr->conn, pr->msg, "D-Bus path registration failed");
goto fail;