summaryrefslogtreecommitdiffstats
path: root/auth_mellon_handler.c
diff options
context:
space:
mode:
authorolavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53>2011-05-18 10:49:08 +0000
committerolavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53>2011-05-18 10:49:08 +0000
commit892592fe13ed55c6b8a89a6659b6ea0e4e066046 (patch)
tree0e5804ba6e17571601feaa763c823dee1d8b1975 /auth_mellon_handler.c
parentcd96f70a8048878dd26aeda52c34ff2d480802bd (diff)
downloadmod_auth_mellon-892592fe13ed55c6b8a89a6659b6ea0e4e066046.tar.gz
mod_auth_mellon-892592fe13ed55c6b8a89a6659b6ea0e4e066046.tar.xz
mod_auth_mellon-892592fe13ed55c6b8a89a6659b6ea0e4e066046.zip
Change cfg->idp_metadata_files to an array instead of an hash.
git-svn-id: https://modmellon.googlecode.com/svn/trunk@126 a716ebb1-153a-0410-b759-cfb97c6a1b53
Diffstat (limited to 'auth_mellon_handler.c')
-rw-r--r--auth_mellon_handler.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/auth_mellon_handler.c b/auth_mellon_handler.c
index c0379e8..c3284c3 100644
--- a/auth_mellon_handler.c
+++ b/auth_mellon_handler.c
@@ -216,33 +216,27 @@ static int am_server_add_providers(request_rec *r)
am_dir_cfg_rec *cfg = am_get_dir_cfg(r);
const char *idp_metadata_file;
const char *idp_public_key_file;
- apr_hash_index_t *index;
+ apr_size_t index;
int count = 0;
- if (apr_hash_count(cfg->idp_metadata_files) == 1)
+ if (cfg->idp_metadata_files->nelts == 1)
idp_public_key_file = cfg->idp_public_key_file;
else
idp_public_key_file = NULL;
- for (index = apr_hash_first(r->pool, cfg->idp_metadata_files);
- index;
- index = apr_hash_next(index)) {
- const char *idp_provider_id;
- apr_ssize_t len;
+ for (index = 0; index < cfg->idp_metadata_files->nelts; index++) {
int ret;
-
- apr_hash_this(index, (const void **)&idp_provider_id,
- &len, (void *)&idp_metadata_file);
+ idp_metadata_file = APR_ARRAY_IDX(cfg->idp_metadata_files, index,
+ const char *);
-
ret = lasso_server_add_provider(cfg->server, LASSO_PROVIDER_ROLE_IDP,
idp_metadata_file,
idp_public_key_file,
cfg->idp_ca_file);
if (ret != 0) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
- "Error adding IdP \"%s\" to lasso server object.",
- idp_provider_id);
+ "Error adding IdP from \"%s\" to lasso server object.",
+ idp_metadata_file);
} else {
count++;
}