summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--auth_mellon_handler.c20
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;
}