summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2007-01-26 16:21:47 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2007-01-26 16:21:47 +0000
commitf84e31fac1a1f7cf602afac6688bb4b9b02babb9 (patch)
treeec83e6b5fecbe2174ab0558ba734e630255d7469 /input
parent10cdcaa9bc6a49d98dcd3b3c1bf3c807ff82a578 (diff)
Close the control and interrupt sockets after call ioctl HIDPCONNADD
Diffstat (limited to 'input')
-rw-r--r--input/input-service.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/input/input-service.c b/input/input-service.c
index 02903d0e..3a309068 100644
--- a/input/input-service.c
+++ b/input/input-service.c
@@ -473,22 +473,24 @@ static gboolean interrupt_connect_cb(GIOChannel *chan, GIOCondition cond,
goto failed;
}
- close(ctl);
send_message_and_unref(pc->conn,
dbus_message_new_method_return(pc->msg));
- pending_connect_free(pc);
- g_io_channel_unref(chan);
-
- return FALSE;
-
+ close (ctl);
+ goto cleanup;
failed:
+ err_connection_failed(pc->conn, pc->msg, strerror(err));
+
+cleanup:
if (isk > 0)
close(isk);
+ close(idev->hidp.ctrl_sock);
+
idev->hidp.intr_sock = -1;
- err_connection_failed(pc->conn, pc->msg, strerror(err));
+ idev->hidp.ctrl_sock = -1;
+
pending_connect_free(pc);
g_io_channel_unref(chan);