summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@entrouvert.com>2004-12-15 10:14:27 +0000
committerFrederic Peters <fpeters@entrouvert.com>2004-12-15 10:14:27 +0000
commit3dc8389da176bc6e7bb66ea1eac2db02e68741ea (patch)
tree219fdbbbad7574fa3f0c275c9abd67ff7d04664c
parent501da6b2b6ccdc9413c416d6ea5cb6541b648070 (diff)
downloadlasso-3dc8389da176bc6e7bb66ea1eac2db02e68741ea.tar.gz
lasso-3dc8389da176bc6e7bb66ea1eac2db02e68741ea.tar.xz
lasso-3dc8389da176bc6e7bb66ea1eac2db02e68741ea.zip
new LASSO_PROFILE_ERROR_NAME_IDENTIFIER_NOT_FOUND error code
-rw-r--r--lasso/id-ff/defederation.c4
-rw-r--r--lasso/id-ff/lecp.c4
-rw-r--r--lasso/id-ff/logout.c4
-rw-r--r--lasso/xml/errors.c2
-rw-r--r--lasso/xml/errors.h1
5 files changed, 7 insertions, 8 deletions
diff --git a/lasso/id-ff/defederation.c b/lasso/id-ff/defederation.c
index 8b48f431..70051635 100644
--- a/lasso/id-ff/defederation.c
+++ b/lasso/id-ff/defederation.c
@@ -177,9 +177,7 @@ lasso_defederation_init_notification(LassoDefederation *defederation, gchar *rem
/* get the nameIdentifier to send the federation termination notification */
nameIdentifier = lasso_profile_get_nameIdentifier(profile);
if (nameIdentifier == NULL) {
- message(G_LOG_LEVEL_CRITICAL, "Name identifier not found for %s",
- profile->remote_providerID);
- return -1;
+ return critical_error(LASSO_PROFILE_ERROR_NAME_IDENTIFIER_NOT_FOUND);
}
/* get / verify http method */
diff --git a/lasso/id-ff/lecp.c b/lasso/id-ff/lecp.c
index 27374548..867a3c66 100644
--- a/lasso/id-ff/lecp.c
+++ b/lasso/id-ff/lecp.c
@@ -143,8 +143,8 @@ lasso_lecp_build_authn_response_envelope_msg(LassoLecp *lecp)
provider = g_hash_table_lookup(profile->server->providers, profile->remote_providerID);
if (provider == NULL) {
- message(G_LOG_LEVEL_CRITICAL, "Provider %s not found", profile->remote_providerID);
- return -1;
+ return critical_error(LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND,
+ profile->remote_providerID);
}
/* build lib:AuthnResponse */
diff --git a/lasso/id-ff/logout.c b/lasso/id-ff/logout.c
index 55615573..87e7a876 100644
--- a/lasso/id-ff/logout.c
+++ b/lasso/id-ff/logout.c
@@ -308,9 +308,7 @@ lasso_logout_init_request(LassoLogout *logout, char *remote_providerID,
nameIdentifier = lasso_profile_get_nameIdentifier(profile);
if (nameIdentifier == NULL) {
- message(G_LOG_LEVEL_CRITICAL, "Name identifier not found for %s",
- profile->remote_providerID);
- return -1;
+ return critical_error(LASSO_PROFILE_ERROR_NAME_IDENTIFIER_NOT_FOUND);
}
}
diff --git a/lasso/xml/errors.c b/lasso/xml/errors.c
index ec6a76de..0037b831 100644
--- a/lasso/xml/errors.c
+++ b/lasso/xml/errors.c
@@ -93,6 +93,8 @@ lasso_strerror(int error_code)
return "Identity not found";
case LASSO_PROFILE_ERROR_FEDERATION_NOT_FOUND:
return "Federation not found";
+ case LASSO_PROFILE_ERROR_NAME_IDENTIFIER_NOT_FOUND:
+ return "Name identifier not found";
case LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ:
return "An object type provided as parameter "\
diff --git a/lasso/xml/errors.h b/lasso/xml/errors.h
index 45d335d6..19d11fb2 100644
--- a/lasso/xml/errors.h
+++ b/lasso/xml/errors.h
@@ -68,6 +68,7 @@
#define LASSO_PROFILE_ERROR_UNKNOWN_PROFILE_URL -410
#define LASSO_PROFILE_ERROR_IDENTITY_NOT_FOUND -411
#define LASSO_PROFILE_ERROR_FEDERATION_NOT_FOUND -412
+#define LASSO_PROFILE_ERROR_NAME_IDENTIFIER_NOT_FOUND -413
/* functions/methods parameters checking */
#define LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ -501