Hi, On Wed, Dec 07, 2016 at 01:45:51AM +0200, Lev Stipakov wrote: > #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
I find this a non-robust approach to this. What is wrong with if ( c->c2.inotify_fd > 0 ) { event_ctl (c->c2.event_set, c->c2.inotify_fd, EVENT_READ, (void*)&file_shift); } (as I suggested on IRC yesterday evening)? This will ensure that inotify is armed *if* it got prepped, independent of "whatever other flags are active in the system" - next thing, someone adds a "--no-inotify" run-time switch, and you'll have to revisit this place again - or someone else finds a use for inotify in client mode, and this will also need touching. It will fix the issue at hand, but is not good code. Also, braces. See CodingStyle in the wiki. gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025 g...@net.informatik.tu-muenchen.de
signature.asc
Description: PGP signature
------------------------------------------------------------------------------ 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