projects
/
connman
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb02865
)
Register inotify watch only if setup succeeds
author
Marcel Holtmann
<marcel@holtmann.org>
Thu, 23 Apr 2009 08:04:38 +0000
(09:04 +0100)
committer
Marcel Holtmann
<marcel@holtmann.org>
Thu, 23 Apr 2009 08:04:38 +0000
(09:04 +0100)
plugins/loopback.c
patch
|
blob
|
history
diff --git
a/plugins/loopback.c
b/plugins/loopback.c
index
04bd7a1
..
deaaac2
100644
(file)
--- a/
plugins/loopback.c
+++ b/
plugins/loopback.c
@@
-101,9
+101,6
@@
static int create_watch(void)
return -EIO;
}
- g_io_add_watch(inotify_channel, G_IO_IN | G_IO_ERR | G_IO_HUP,
- inotify_event, NULL);
-
hostname_descriptor = inotify_add_watch(fd, "/etc/hostname",
IN_MODIFY | IN_DELETE_SELF | IN_MOVE_SELF);
if (hostname_descriptor < 0) {
@@
-114,6
+111,9
@@
static int create_watch(void)
return -EIO;
}
+ g_io_add_watch(inotify_channel, G_IO_IN | G_IO_ERR | G_IO_HUP,
+ inotify_event, NULL);
+
return 0;
}