diff options
author | Frederic Peters <fpeters@entrouvert.com> | 2004-12-14 15:46:25 +0000 |
---|---|---|
committer | Frederic Peters <fpeters@entrouvert.com> | 2004-12-14 15:46:25 +0000 |
commit | 2bda2b596eaaa5c83aca90ea73b9bbec31985a5b (patch) | |
tree | 49d7498931904dcbe8a413f0bb4d7da1de569859 /lasso/id-ff/logout.c | |
parent | 18dbcc81631d5439226c6f5e5d166b58045e3e9b (diff) | |
download | lasso-2bda2b596eaaa5c83aca90ea73b9bbec31985a5b.tar.gz lasso-2bda2b596eaaa5c83aca90ea73b9bbec31985a5b.tar.xz lasso-2bda2b596eaaa5c83aca90ea73b9bbec31985a5b.zip |
more error code harmony, now with a new critical_error macro
Diffstat (limited to 'lasso/id-ff/logout.c')
-rw-r--r-- | lasso/id-ff/logout.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/lasso/id-ff/logout.c b/lasso/id-ff/logout.c index c74012d4..d9d62f3f 100644 --- a/lasso/id-ff/logout.c +++ b/lasso/id-ff/logout.c @@ -75,7 +75,7 @@ lasso_logout_build_request_msg(LassoLogout *logout) remote_provider = g_hash_table_lookup(profile->server->providers, profile->remote_providerID); if (LASSO_IS_PROVIDER(remote_provider) == FALSE) { - return error_code(G_LOG_LEVEL_CRITICAL, LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND, + return critical_error(LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND, profile->remote_providerID); } @@ -113,8 +113,7 @@ lasso_logout_build_request_msg(LassoLogout *logout) return 0; } - message(G_LOG_LEVEL_CRITICAL, "Invalid http method"); - return LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD; + return critical_error(LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD); } @@ -322,7 +321,7 @@ lasso_logout_init_request(LassoLogout *logout, char *remote_providerID, remote_provider = g_hash_table_lookup( profile->server->providers, profile->remote_providerID); if (LASSO_IS_PROVIDER(remote_provider) == FALSE) { - return error_code(G_LOG_LEVEL_CRITICAL, LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND, + return critical_error(LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND, profile->remote_providerID); } @@ -416,13 +415,13 @@ gint lasso_logout_process_request_msg(LassoLogout *logout, char *request_msg) profile->request = lasso_lib_logout_request_new(); format = lasso_node_init_from_message(profile->request, request_msg); if (format == LASSO_MESSAGE_FORMAT_UNKNOWN || format == LASSO_MESSAGE_FORMAT_ERROR) { - return error_code(G_LOG_LEVEL_CRITICAL, LASSO_PROFILE_ERROR_INVALID_MSG); + return critical_error(LASSO_PROFILE_ERROR_INVALID_MSG); } remote_provider = g_hash_table_lookup(profile->server->providers, LASSO_LIB_LOGOUT_REQUEST(profile->request)->ProviderID); if (LASSO_IS_PROVIDER(remote_provider) == FALSE) { - return error_code(G_LOG_LEVEL_CRITICAL, LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND, + return critical_error(LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND, LASSO_LIB_LOGOUT_REQUEST(profile->request)->ProviderID); } @@ -488,7 +487,7 @@ lasso_logout_process_response_msg(LassoLogout *logout, gchar *response_msg) profile->response = lasso_lib_logout_response_new(); format = lasso_node_init_from_message(profile->response, response_msg); if (format == LASSO_MESSAGE_FORMAT_UNKNOWN || format == LASSO_MESSAGE_FORMAT_ERROR) { - return error_code(G_LOG_LEVEL_CRITICAL, LASSO_PROFILE_ERROR_INVALID_MSG); + return critical_error(LASSO_PROFILE_ERROR_INVALID_MSG); } if (format == LASSO_MESSAGE_FORMAT_SOAP) @@ -500,14 +499,13 @@ lasso_logout_process_response_msg(LassoLogout *logout, gchar *response_msg) profile->remote_providerID = g_strdup( LASSO_LIB_STATUS_RESPONSE(profile->response)->ProviderID); if (profile->remote_providerID == NULL) { - message(G_LOG_LEVEL_CRITICAL, "ProviderID not found"); - return LASSO_PROFILE_ERROR_MISSING_REMOTE_PROVIDERID; + return critical_error(LASSO_PROFILE_ERROR_MISSING_REMOTE_PROVIDERID); } remote_provider = g_hash_table_lookup(profile->server->providers, profile->remote_providerID); if (LASSO_IS_PROVIDER(remote_provider) == FALSE) { - return error_code(G_LOG_LEVEL_CRITICAL, LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND, + return critical_error(LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND, profile->remote_providerID); } @@ -653,7 +651,7 @@ lasso_logout_validate_request(LassoLogout *logout) remote_provider = g_hash_table_lookup(profile->server->providers, profile->remote_providerID); if (LASSO_IS_PROVIDER(remote_provider) == FALSE) { - return error_code(G_LOG_LEVEL_CRITICAL, LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND, + return critical_error(LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND, profile->remote_providerID); } |