aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2013-02-20 15:21:51 +0100
committerMartin Willi <martin@revosec.ch>2013-07-18 12:24:38 +0200
commitb146ecbc4e565d2d3d7296c0158b9ea63a569d1d (patch)
tree6df6b7d849d819f08d059b835c37944b03aff300
parent890f20989f0535bb2af761821a3682c957bfeff7 (diff)
downloadstrongswan-b146ecbc4e565d2d3d7296c0158b9ea63a569d1d.tar.bz2
strongswan-b146ecbc4e565d2d3d7296c0158b9ea63a569d1d.tar.xz
libfast: cancel thread if it fails to accept fcgi sessions
-rw-r--r--src/libfast/fast_dispatcher.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libfast/fast_dispatcher.c b/src/libfast/fast_dispatcher.c
index e0c57b47d..4daf91905 100644
--- a/src/libfast/fast_dispatcher.c
+++ b/src/libfast/fast_dispatcher.c
@@ -152,6 +152,10 @@ static fast_session_t* load_session(private_fast_dispatcher_t *this)
context = this->context_constructor(this->param);
}
session = fast_session_create(context);
+ if (!session)
+ {
+ return NULL;
+ }
enumerator = this->controllers->create_enumerator(this->controllers);
while (enumerator->enumerate(enumerator, &centry))
@@ -306,7 +310,7 @@ static void dispatch(private_fast_dispatcher_t *this)
if (request == NULL)
{
- continue;
+ break;
}
now = time_monotonic(NULL);
sid = request->get_cookie(request, "SID");