Change am_server_add_providers to return number of providers from LassoServer object.

git-svn-id: https://modmellon.googlecode.com/svn/trunk/mod_mellon2@127 a716ebb1-153a-0410-b759-cfb97c6a1b53
This commit is contained in:
olavmrk 2011-05-18 10:49:14 +00:00
parent 5e43170724
commit 2d9911f4d0
1 changed files with 2 additions and 5 deletions

View File

@ -211,13 +211,12 @@ static char *am_generate_metadata(apr_pool_t *p, request_rec *r)
* Returns:
* number of loaded providers
*/
static int am_server_add_providers(request_rec *r)
static guint 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_size_t index;
int count = 0;
if (cfg->idp_metadata_files->nelts == 1)
idp_public_key_file = cfg->idp_public_key_file;
@ -237,12 +236,10 @@ static int am_server_add_providers(request_rec *r)
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"Error adding IdP from \"%s\" to lasso server object.",
idp_metadata_file);
} else {
count++;
}
}
return count;
return g_hash_table_size(cfg->server->providers);
}
static LassoServer *am_get_lasso_server(request_rec *r)