Async-push is a server side feature and inotify_fd is
initialized in server mode.

Trac #786
---
 src/openvpn/forward.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c
index b50a2e0..4502e10 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
 
   /*
-- 
1.9.1


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to