From f01342d019c84b093e953b3aeddfdc6c78dc95a9 Mon Sep 17 00:00:00 2001 From: olavmrk Date: Wed, 6 Mar 2013 12:54:10 +0000 Subject: Fix incorrect use of const-keyword in login handler. This doesn't fix any bugs, it just makes the code cleaner. git-svn-id: https://modmellon.googlecode.com/svn/trunk@185 a716ebb1-153a-0410-b759-cfb97c6a1b53 --- auth_mellon_handler.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/auth_mellon_handler.c b/auth_mellon_handler.c index 3007a01..dfaa3b2 100644 --- a/auth_mellon_handler.c +++ b/auth_mellon_handler.c @@ -2762,6 +2762,7 @@ static int am_handle_auth(request_rec *r) */ static int am_handle_login(request_rec *r) { + char *idp_param; const char *idp; char *return_to; char *is_passive_str; @@ -2782,14 +2783,15 @@ static int am_handle_login(request_rec *r) return ret; } - idp = am_extract_query_parameter(r->pool, r->args, "IdP"); - if(idp != NULL) { - ret = am_urldecode((char*)idp); + idp_param = am_extract_query_parameter(r->pool, r->args, "IdP"); + if(idp_param != NULL) { + ret = am_urldecode(idp_param); if(ret != OK) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "Error urldecoding IdP parameter."); return ret; } + idp = idp_param; } else { /* Use the default IdP. */ idp = am_get_idp(r); -- cgit