input: skip auth/encrypt if the link is not available and allow connections

This commit is contained in:
Claudio Takahasi 2007-05-10 13:57:15 +00:00
parent e26377ac2d
commit cc7ee42ddf
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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;