From ada09c331c02c73acf9e208871a7fc04589a77fa Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Fri, 30 Mar 2007 13:54:31 +0000 Subject: network: ignore repeated BNEP conn req msg from the same device if there a pending auth --- network/server.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'network/server.c') diff --git a/network/server.c b/network/server.c index 5ae7c634..579e5c06 100644 --- a/network/server.c +++ b/network/server.c @@ -55,6 +55,7 @@ struct pending_auth { char *addr; /* Bluetooth Address */ GIOChannel *io; /* BNEP connection setup io channel */ + int attempts; /* BNEP setup conn requests counter */ }; /* Main server structure */ @@ -379,6 +380,14 @@ static gboolean connect_setup_event(GIOChannel *chan, return FALSE; } + if (++ns->pauth->attempts > 1) { + /* + * Ignore repeated BNEP setup connection request: there + * is a pending authorization request for this device. + */ + return TRUE; + } + /* * FIXME: According to BNEP SPEC the UUID size can be * 2-16 bytes. Currently only 2 bytes size is supported -- cgit