summaryrefslogtreecommitdiffstats
path: root/network/server.c
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2007-03-28 15:22:39 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2007-03-28 15:22:39 +0000
commit50bec7777e06c2321b7b21c8b69ff48acad54190 (patch)
treefccd297cc197349361671c9b096aedd35dca7831 /network/server.c
parent44f1d3a1a09a29afd84496a1d6b49d08caf3dbe2 (diff)
network: fixed server role when calling bnep_connadd
Diffstat (limited to 'network/server.c')
-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;