diff options
-rw-r--r-- | network/server.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 |