From: Lev Stipakov Date: Tue, 6 Dec 2016 23:45:51 +0000 (+0200) Subject: Arm inotify only in server mode X-Git-Tag: v2.4_rc2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7084a3993fa35c6fb71abe8aac7b30f442205e2a;p=thirdparty%2Fopenvpn.git Arm inotify only in server mode Async-push is a server side feature and inotify_fd is initialized in server mode. Trac: #786 Signed-off-by: Lev Stipakov Acked-by: David Sommerseth Message-Id: <1481067951-28917-1-git-send-email-lstipakov@gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13415.html Signed-off-by: David Sommerseth --- diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index b50a2e025..4502e1012 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -1578,7 +1578,8 @@ io_wait_dowork (struct context *c, const unsigned int flags) #ifdef ENABLE_ASYNC_PUSH /* arm inotify watcher */ - event_ctl (c->c2.event_set, c->c2.inotify_fd, EVENT_READ, (void*)&file_shift); + if (c->options.mode == MODE_SERVER) + event_ctl (c->c2.event_set, c->c2.inotify_fd, EVENT_READ, (void*)&file_shift); #endif /*