From 50bec7777e06c2321b7b21c8b69ff48acad54190 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Wed, 28 Mar 2007 15:22:39 +0000 Subject: network: fixed server role when calling bnep_connadd --- network/server.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'network') 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; -- cgit