summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Peter Hurley 2010-10-27 09:28:24 -0400
committerGravatar Stefan Richter 2012-02-05 10:32:44 +0100
commitea4acf08bc71872215be84deabfb42b9133660ab (patch)
treed564bacaeb5465955409b3b21bb364d08cc19ba2
parentretry raw1394_read/write/lock/lock64 with delays after ack-busy (diff)
Reset device fd upon error condition in handle_inotify()
If an error is encountered while adding a new device in inotify handling, make sure the fd is marked invalid (-1). Signed-off-by: Peter Hurley <phurley@charter.net> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
-rw-r--r--src/fw.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/fw.c b/src/fw.c
index cfaab13..2d8a292 100644
--- a/src/fw.c
+++ b/src/fw.c
@@ -426,6 +426,7 @@ handle_inotify(raw1394handle_t handle, struct epoll_closure *ec,
ep.data.ptr = &fwhandle->devices[i].closure;
if (epoll_ctl(fwhandle->epoll_fd, EPOLL_CTL_ADD, fd, &ep) < 0) {
close(fd);
+ fwhandle->devices[i].fd = -1;
return -1;
}
pan>Added support for environments with 64 bit kernel and 32 bit userland.Gravatar aeb 8-7/+45 2000-04-27Fixed missing setting of ext code in raw1394_start_lock()Gravatar aeb 1-0/+1 2000-04-15Fixed lock transaction to actually return response value.Gravatar aeb 3-5/+11 2000-04-12Add userdata functions as news.Gravatar aeb 1-0/+4 2000-04-05Add userdata functions.Gravatar aeb 3-0/+18 2000-03-18Bump version number to 0.6.Gravatar aeb 3-5/+6 2000-03-18Mention byte order change.Gravatar aeb 1-0/+2 2000-03-18Mention SourceForge home.Gravatar aeb 1-1/+5