stream-service: Prevent race conditions due to blocking call to destroy()
authorTobias Brunner <tobias@strongswan.org>
Mon, 21 Jul 2014 10:23:37 +0000 (12:23 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 9 Sep 2014 08:58:59 +0000 (10:58 +0200)
commitcee338eccd57b4c2bbcdc899637cbbbbafa608c5
treec60fbcf7617097e1ce88d3d05cc16599c6fa8282
parent10859adfd4268a819766b436e9b5f40bc69c54bb
stream-service: Prevent race conditions due to blocking call to destroy()

In the previous implementation queued jobs could prevent a service from
getting destroyed.  This could have lead to a deadlock when the
processor is cancelled.  Now destroy() still blocks, but waits only for
actually running tasks.  The service instance is reference counted so that
queued jobs can safely be destroyed.
src/libstrongswan/networking/streams/stream_service.c