summaryrefslogtreecommitdiffstats
path: root/network
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2007-03-30 13:54:31 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2007-03-30 13:54:31 +0000
commitada09c331c02c73acf9e208871a7fc04589a77fa (patch)
tree6d28b3f8db7922ce455c5a045bde406a1b3157cc /network
parent778fb0ca85a18c20a60cbd44c8786d60efe4d297 (diff)
network: ignore repeated BNEP conn req msg from the same device if there a pending auth
Diffstat (limited to 'network')
-rw-r--r--network/server.c9
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