summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2007-05-10 13:57:15 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2007-05-10 13:57:15 +0000
commitcc7ee42ddf28a602f3160fa024da36104eb925d1 (patch)
tree23cc4cf50564aa0aed8aea885f2a892456fec5ef
parente26377ac2dec7905881b1c062795b7057de91c18 (diff)
input: skip auth/encrypt if the link is not available and allow connections
-rw-r--r--input/device.c2
-rw-r--r--input/server.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/input/device.c b/input/device.c
index b79bbc45..d9f95c4e 100644
--- a/input/device.c
+++ b/input/device.c
@@ -557,7 +557,7 @@ static gboolean interrupt_connect_cb(GIOChannel *chan,
if (idev->hidp.subclass & 0x40) {
int ret;
ret = encrypt_link(&idev->src, &idev->dst);
- if (ret < 0) {
+ if (ret < 0 && ret != -ENOKEY) {
err = -ret;
close(ctl);
goto failed;
diff --git a/input/server.c b/input/server.c
index 9596178f..2a9e08d4 100644
--- a/input/server.c
+++ b/input/server.c
@@ -108,7 +108,8 @@ static void create_device(struct session_data *session)
}
if (req.subclass & 0x40) {
- if (encrypt_link(&session->src, &session->dst) < 0) {
+ err = encrypt_link(&session->src, &session->dst);
+ if (err < 0 && err != -ENOKEY) {
if (req.rd_data)
free(req.rd_data);
goto cleanup;