From f0426721e0907c87e214329ab7d4cf2c06116110 Mon Sep 17 00:00:00 2001 From: olavmrk Date: Wed, 18 May 2011 10:48:52 +0000 Subject: 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 --- auth_mellon_handler.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'auth_mellon_handler.c') 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; } -- cgit