watcher: release threads waiting in remove() when watcher thread gets cancelled
authorMartin Willi <martin@revosec.ch>
Mon, 1 Jul 2013 16:34:08 +0000 (18:34 +0200)
committerMartin Willi <martin@revosec.ch>
Thu, 18 Jul 2013 14:00:29 +0000 (16:00 +0200)
commita558ba16f314d250ef62a593e66e263123a0e9a3
tree19d66cccf63919a0a4bc4636cbdbd63a8bc62fb4
parente6e8a2b2e01e91f75048fd4a33e04a0a7612bd12
watcher: release threads waiting in remove() when watcher thread gets cancelled

During daemon shutdown, users might call remove() after processor.set_threads(0)
has been called. This gets problematic, as a watch event might be unable
to signal completion when no threads are available anymore. Work around this
issue by cancelling waiters once processor.cancel() has been called.
src/libstrongswan/processing/watcher.c