summaryrefslogtreecommitdiffstats
path: root/network
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2008-05-02 20:56:40 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2008-05-02 20:56:40 +0000
commit93123d3eccdb503246f10b40ef2b62418bda6e8f (patch)
treef32bee6cc069760a3ca1c3cda2752adbd4acc399 /network
parent9491a544f622e40453265c30f24ce44a61440cc1 (diff)
Check trusted device list before request authorization
Diffstat (limited to 'network')
-rw-r--r--network/server.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/network/server.c b/network/server.c
index 0915d9d4..046b20b3 100644
--- a/network/server.c
+++ b/network/server.c
@@ -592,14 +592,16 @@ static gboolean bnep_setup(GIOChannel *chan,
goto reply;
}
+ setup = setup_session_new(address, dst_role, src_role, sk, to->watch);
+
/* Wait authorization before reply success */
if (authorize_connection(ns, address) < 0) {
+ setup_session_free(setup);
+ setup = NULL;
rsp = BNEP_CONN_NOT_ALLOWED;
goto reply;
}
- setup = setup_session_new(address, dst_role, src_role, sk, to->watch);
-
g_source_remove(to->id);
to->id = 0;