diff options
author | olavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53> | 2008-10-20 11:50:17 +0000 |
---|---|---|
committer | olavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53> | 2008-10-20 11:50:17 +0000 |
commit | 9aaaf79f05926ca21c69a6198f78c560bedbe5a8 (patch) | |
tree | afd6faf2f5a754c1f03dc91cfce7f2061cb57cd2 /auth_mellon_handler.c | |
parent | 4a11abb0766232162d57096cfaea7445fd60a3d0 (diff) | |
download | mod_auth_mellon-9aaaf79f05926ca21c69a6198f78c560bedbe5a8.tar.gz mod_auth_mellon-9aaaf79f05926ca21c69a6198f78c560bedbe5a8.tar.xz mod_auth_mellon-9aaaf79f05926ca21c69a6198f78c560bedbe5a8.zip |
Handle errors when locking session mutex.
In some cases it is possible that the mutex lock operation
fails. This makes the server return a 500 Internal Server Error
in those cases, instead of crashing.
Thanks to Emmanuel Dreyfus for the patch.
git-svn-id: https://modmellon.googlecode.com/svn/trunk@28 a716ebb1-153a-0410-b759-cfb97c6a1b53
Diffstat (limited to 'auth_mellon_handler.c')
-rw-r--r-- | auth_mellon_handler.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/auth_mellon_handler.c b/auth_mellon_handler.c index 3c1f578..4323de3 100644 --- a/auth_mellon_handler.c +++ b/auth_mellon_handler.c @@ -1304,9 +1304,16 @@ static int am_auth_new_ticket(request_rec *r) LassoSamlp2AuthnRequest *request; gint ret; char *redirect_to; + am_cache_entry_t *session; /* Create session. */ - am_release_request_session(r, am_new_request_session(r)); + session = am_new_request_session(r); + if(session == NULL) { + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, + "am_new_request_session() failed"); + return HTTP_INTERNAL_SERVER_ERROR; + } + am_release_request_session(r, session); server = am_get_lasso_server(r); |