summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorolavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53>2013-03-06 12:54:10 +0000
committerolavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53>2013-03-06 12:54:10 +0000
commitf01342d019c84b093e953b3aeddfdc6c78dc95a9 (patch)
tree35581b9f6f9b582f37daaf9db3bebd6a620f2da0
parente87049bac944f4909502a4db359ce90f50e91784 (diff)
downloadmod_auth_mellon-f01342d019c84b093e953b3aeddfdc6c78dc95a9.tar.gz
mod_auth_mellon-f01342d019c84b093e953b3aeddfdc6c78dc95a9.tar.xz
mod_auth_mellon-f01342d019c84b093e953b3aeddfdc6c78dc95a9.zip
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
-rw-r--r--auth_mellon_handler.c8
1 files 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);