diff options
author | olavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53> | 2011-05-18 10:48:52 +0000 |
---|---|---|
committer | olavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53> | 2011-05-18 10:48:52 +0000 |
commit | f0426721e0907c87e214329ab7d4cf2c06116110 (patch) | |
tree | 58c6a0294aff97cf9fff00d71dd5adecb5488e85 /auth_mellon_handler.c | |
parent | a0ff8fc554f83a58889e8f808d699d8f27cce7e5 (diff) | |
download | mod_auth_mellon-f0426721e0907c87e214329ab7d4cf2c06116110.tar.gz mod_auth_mellon-f0426721e0907c87e214329ab7d4cf2c06116110.tar.xz mod_auth_mellon-f0426721e0907c87e214329ab7d4cf2c06116110.zip |
Change am_first_idp() to retrieve the entityID from the LassoServer object.
git-svn-id: https://modmellon.googlecode.com/svn/trunk@123 a716ebb1-153a-0410-b759-cfb97c6a1b53
Diffstat (limited to 'auth_mellon_handler.c')
-rw-r--r-- | auth_mellon_handler.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/auth_mellon_handler.c b/auth_mellon_handler.c index 84c2d58..b299ee3 100644 --- a/auth_mellon_handler.c +++ b/auth_mellon_handler.c @@ -318,19 +318,19 @@ static LassoServer *am_get_lasso_server(request_rec *r) */ static const char *am_first_idp(request_rec *r) { - am_dir_cfg_rec *cfg = am_get_dir_cfg(r); - apr_hash_index_t *index; - const char *provider_id; - apr_ssize_t len; - void *idp_metadata_file; + LassoServer *server; + GHashTableIter iter; + const char *idp_providerid; + + server = am_get_lasso_server(r); + if (server == NULL) + return NULL; - index = apr_hash_first(r->pool, cfg->idp_metadata_files); - if (index == NULL) + g_hash_table_iter_init (&iter, server->providers); + if (!g_hash_table_iter_next(&iter, (void**)&idp_providerid, NULL)) return NULL; - apr_hash_this(index, (const void **)&provider_id, - &len, &idp_metadata_file); - return provider_id; + return idp_providerid; } |