aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/networking/streams/stream_service.c
Commit message (Collapse)AuthorAgeFilesLines
* stream-service: Prevent race conditions due to blocking call to destroy()Tobias Brunner2014-09-091-5/+62
| | | | | | | | 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.
* stream-service: Do not accept or re-register when service is terminatedTobias Brunner2014-09-091-2/+10
|
* stream-service: Restart accepting without blockingTobias Brunner2014-09-091-2/+7
| | | | | | | | | | | | Calling on_accept() sometimes lead to deadlocks when service->destroy() was called concurrently. That is, two threads waiting in on_accept() but the last worker would only wake one due to the call to signal(). Calling broadcast() wouldn't help either as that could lead to crashes if the thread that called destroy() is woken first. This is also more efficient as a constant pool of concurrent workers can be maintained, otherwise peaks at the limit were followed by only a single worker being active.
* stream: Separate TCP/Unix stream helpers from stream/service implementationsMartin Willi2014-06-041-97/+2
| | | | | | This allows us to disable Unix sockets cleanly on Windows. Replaces some read/write calls with recv/send counterparts, as Winsock does not like read/writes.
* Use exact mask when calling umask(2)Tobias Brunner2013-10-291-1/+1
| | | | | | Due to the previous negation the high bits of the mask were set, which at least some versions of the Android build system prevent with a compile-time check.
* stream-service: move CAP_CHOWN check from plugins to service constructorMartin Willi2013-07-181-0/+5
| | | | | A plugin service can be a TCP socket now, so it does not make much sense to strictly check for CAP_CHOWN.
* stream: don't close underlying socket when creating a stream from itMartin Willi2013-07-181-1/+6
|
* stream: support keeping the service alive outside of service callbackMartin Willi2013-07-181-2/+1
|
* stream: support cancellation of stream service callbackMartin Willi2013-07-181-2/+3
|
* stream: add a concurrency option to services, limiting parallel callbacksMartin Willi2013-07-181-3/+64
|
* stream: add a job priority option to stream servicesMartin Willi2013-07-181-3/+14
|
* stream: add backlog option to stream services, forward to listen()Martin Willi2013-07-181-4/+4
|
* stream: add support for TCP stream servicesMartin Willi2013-07-181-0/+43
|
* stream: add support for UNIX stream servicesMartin Willi2013-07-181-0/+51
|
* stream: create library instance of stream-managerMartin Willi2013-07-181-2/+1
|
* stream: add a stream service class abstracting services using BSD socketsMartin Willi2013-07-181-0/+157