summaryrefslogtreecommitdiffstats
path: root/lasso
diff options
context:
space:
mode:
authorDamien Laniel <dlaniel@entrouvert.com>2007-06-07 13:32:09 +0000
committerDamien Laniel <dlaniel@entrouvert.com>2007-06-07 13:32:09 +0000
commit36dbe4155eae4341aae39f58e2fa2aa7536e111e (patch)
tree452901ee735de91b53ab959ca0212f36eefb76d6 /lasso
parent7db5d0d33d2e14a5aabcd620173d274142da3d3b (diff)
downloadlasso-36dbe4155eae4341aae39f58e2fa2aa7536e111e.tar.gz
lasso-36dbe4155eae4341aae39f58e2fa2aa7536e111e.tar.xz
lasso-36dbe4155eae4341aae39f58e2fa2aa7536e111e.zip
check session existence
Diffstat (limited to 'lasso')
-rw-r--r--lasso/id-ff/session.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lasso/id-ff/session.c b/lasso/id-ff/session.c
index 2720f011..f1162983 100644
--- a/lasso/id-ff/session.c
+++ b/lasso/id-ff/session.c
@@ -307,6 +307,8 @@ gint
lasso_session_add_endpoint_reference(LassoSession *session, LassoWsAddrEndpointReference *epr)
{
GList *i;
+
+ g_return_val_if_fail(LASSO_IS_SESSION(session), LASSO_PARAM_ERROR_INVALID_VALUE);
for (i = g_list_first(epr->Metadata->any); i != NULL; i = g_list_next(i)) {
if (LASSO_IS_IDWSF2_DISCO_SERVICE_TYPE(i->data)) {
@@ -325,6 +327,8 @@ LassoWsAddrEndpointReference*
lasso_session_get_endpoint_reference(LassoSession *session, const gchar *service_type)
{
LassoWsAddrEndpointReference* epr;
+
+ g_return_val_if_fail(LASSO_IS_SESSION(session), NULL);
epr = g_hash_table_lookup(session->private_data->eprs, service_type);
if (LASSO_IS_WSA_ENDPOINT_REFERENCE(epr)) {
@@ -344,8 +348,7 @@ lasso_session_get_assertion_identity_token(LassoSession *session)
LassoIdWsf2SecToken *sec_token;
LassoSaml2Assertion *assertion = NULL;
- if (! LASSO_IS_SESSION(session))
- return NULL;
+ g_return_val_if_fail(LASSO_IS_SESSION(session), NULL);
epr = lasso_session_get_endpoint_reference(session, LASSO_IDWSF2_DISCO_HREF);
if (! LASSO_IS_WSA_ENDPOINT_REFERENCE(epr)) {