summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--network/server.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/network/server.c b/network/server.c
index e70e13ab..e8dedf7b 100644
--- a/network/server.c
+++ b/network/server.c
@@ -253,10 +253,14 @@ static void authorization_callback(DBusPendingCall *pcall, void *data)
/* FIXME: Is it the correct order? */
sk = g_io_channel_unix_get_fd(ns->pauth->io);
- bnep_connadd(sk, BNEP_SVC_PANU, devname);
+ bnep_connadd(sk, ns->id, devname);
+
+ /* FIXME: Reply not allowed if bnep connection add fails? */
info("Authorization succedded. New connection: %s", devname);
+ /* Enable routing if applied */
+
/* FIXME: send the D-Bus message to notify the new bnep iface */
}
@@ -360,6 +364,11 @@ static gboolean connect_setup_event(GIOChannel *chan,
goto reply;
}
+ /*
+ * FIXME: Check if the connection already exists. Check if the
+ * BNEP SPEC allows return "connection not allowed" for this case
+ */
+
/* Wait authorization before reply success */
if (authorize_connection(ns) < 0) {
response = BNEP_CONN_NOT_ALLOWED;