summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValery Febvre <vfebvre at easter-eggs.com>2004-07-25 16:26:11 +0000
committerValery Febvre <vfebvre at easter-eggs.com>2004-07-25 16:26:11 +0000
commit561b87435a7d5b0b00a6aa811b4a2d944876fa76 (patch)
treed29e7e110b9e89553cf73558135fa3297e3fb14d
parentd792b018cf3234f88c0777274d7b7c9890166f5f (diff)
downloadlasso-561b87435a7d5b0b00a6aa811b4a2d944876fa76.tar.gz
lasso-561b87435a7d5b0b00a6aa811b4a2d944876fa76.tar.xz
lasso-561b87435a7d5b0b00a6aa811b4a2d944876fa76.zip
Replaced 2 debug(ERROR, ...) by new message(G_LOG_LEVEL_ERROR, ...) function
BEWARE: debug() should be used only for debugging messages.
-rw-r--r--lasso/id-ff/logout.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/lasso/id-ff/logout.c b/lasso/id-ff/logout.c
index 0f5c7f47..2a0c49b2 100644
--- a/lasso/id-ff/logout.c
+++ b/lasso/id-ff/logout.c
@@ -310,15 +310,15 @@ lasso_logout_process_request(LassoLogout *logout)
profileContext = LASSO_PROFILE_CONTEXT(logout);
- if(profileContext->request==NULL){
- debug(ERROR, "LogoutRequest not found\n");
+ if(profileContext->request == NULL) {
+ message(G_LOG_LEVEL_ERROR, "LogoutRequest not found\n");
return(-1);
}
/* set the remote provider id from the request */
remote_providerID = lasso_node_get_child_content(profileContext->request, "ProviderID", NULL);
- if(remote_providerID==NULL){
- debug(ERROR, "ProviderID in LogoutRequest not found\n");
+ if(remote_providerID == NULL) {
+ message(G_LOG_LEVEL_ERROR, "ProviderID in LogoutRequest not found\n");
return(-1);
}
profileContext->remote_providerID = remote_providerID;
@@ -327,7 +327,7 @@ lasso_logout_process_request(LassoLogout *logout)
profileContext->response = lasso_logout_response_new(profileContext->server->providerID,
lassoSamlStatusCodeSuccess,
profileContext->request);
- if(profileContext->response==NULL){
+ if(profileContext->response == NULL) {
message(G_LOG_LEVEL_ERROR, "Error while building response\n");
return(-5);
}
@@ -336,27 +336,27 @@ lasso_logout_process_request(LassoLogout *logout)
statusCode_class = LASSO_NODE_GET_CLASS(statusCode);
nameIdentifier = lasso_node_get_child(profileContext->request, "NameIdentifier", NULL);
- if(nameIdentifier==NULL){
+ if(nameIdentifier == NULL) {
message(G_LOG_LEVEL_ERROR, "Name identifier not found in logout request\n");
statusCode_class->set_prop(statusCode, "Value", lassoLibStatusCodeFederationDoesNotExist);
return(-6);
}
remote_providerID = lasso_node_get_child_content(profileContext->request, "ProviderID", NULL);
- if(remote_providerID==NULL){
+ if(remote_providerID == NULL) {
message(G_LOG_LEVEL_ERROR, "Provider id not found in logout request\n");
return(-7);
}
/* verify authentication */
- if(profileContext->user==NULL){
+ if(profileContext->user == NULL) {
message(G_LOG_LEVEL_WARNING, "User environ not found\n");
statusCode_class->set_prop(statusCode, "Value", lassoSamlStatusCodeRequestDenied);
return(-1);
}
assertion = lasso_user_get_assertion(profileContext->user, remote_providerID);
- if(assertion==NULL){
+ if(assertion == NULL) {
message(G_LOG_LEVEL_WARNING, "%s has no assertion\n", remote_providerID);
statusCode_class->set_prop(statusCode, "Value", lassoSamlStatusCodeRequestDenied);
return(-8);
@@ -364,20 +364,20 @@ lasso_logout_process_request(LassoLogout *logout)
/* Verify federation */
identity = lasso_user_get_identity(profileContext->user, remote_providerID);
- if(identity==NULL){
+ if(identity == NULL) {
message(G_LOG_LEVEL_WARNING, "No identity for %s\n", remote_providerID);
statusCode_class->set_prop(statusCode, "Value", lassoLibStatusCodeFederationDoesNotExist);
return(-9);
}
- if(lasso_identity_verify_nameIdentifier(identity, nameIdentifier)==FALSE){
+ if(lasso_identity_verify_nameIdentifier(identity, nameIdentifier) == FALSE) {
message(G_LOG_LEVEL_WARNING, "No name identifier for %s\n", remote_providerID);
statusCode_class->set_prop(statusCode, "Value", lassoLibStatusCodeFederationDoesNotExist);
return(-10);
}
/* verification is ok, save name identifier in logout object */
- switch(profileContext->provider_type){
+ switch(profileContext->provider_type) {
case lassoProviderTypeSp:
/* at sp, everything is ok, delete the assertion */
lasso_user_remove_assertion(profileContext->user, profileContext->remote_providerID);