~ubuntu-branches/ubuntu/hardy/lasso/hardy

« back to all changes in this revision

Viewing changes to lasso/id-ff/identity.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Bienia
  • Date: 2007-07-31 21:35:26 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070731213526-oc6jw5mprcd5tjyy
Tags: 2.0.0-1ubuntu1
* Merge from debian unstable. Remaining changes:
  + debian/control:
    - Modify Maintainer value to match DebianMaintainerField spec.
* debian/rules:
  + Add CC=gcc-4.2 to the configure call else configure won't find jni.h
    from libgcj8-dev.
* configure{,.ac}:
  + Add missing quotes around the value for PHP[45]_LIBS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: identity.c,v 1.55 2005/09/16 13:30:34 fpeters Exp $
 
1
/* $Id: identity.c,v 1.59 2007/01/03 23:35:17 fpeters Exp $
2
2
 *
3
3
 * Lasso - A free implementation of the Liberty Alliance specifications.
4
4
 *
50
50
gint
51
51
lasso_identity_add_federation(LassoIdentity *identity, LassoFederation *federation)
52
52
{
53
 
        g_return_val_if_fail(LASSO_IS_IDENTITY(identity), -1);
54
 
        g_return_val_if_fail(LASSO_IS_FEDERATION(federation), -3);
 
53
        g_return_val_if_fail(LASSO_IS_IDENTITY(identity), LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
 
54
        g_return_val_if_fail(LASSO_IS_FEDERATION(federation),
 
55
                        LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
55
56
 
56
57
        /* add the federation, replace if one already exists */
57
58
        g_hash_table_insert(identity->federations,
91
92
lasso_identity_remove_federation(LassoIdentity *identity, const char *providerID)
92
93
{
93
94
        if (g_hash_table_remove(identity->federations, providerID) == FALSE) {
94
 
                return LASSO_ERROR_UNDEFINED;
 
95
                return LASSO_PROFILE_ERROR_FEDERATION_NOT_FOUND;
95
96
        }
96
97
        identity->is_dirty = TRUE;
97
98
        return 0;
184
185
        while (iter) {
185
186
                t = iter->data;
186
187
                iter = g_list_next(iter);
187
 
                if (service_type == NULL || strcmp(
188
 
                                        t->ServiceInstance->ServiceType, service_type) == 0) {
 
188
                if (service_type == NULL || (t->ServiceInstance && strcmp(
 
189
                                        t->ServiceInstance->ServiceType, service_type) == 0)) {
189
190
                        result = g_list_append(result, g_object_ref(t));
190
191
                }
191
192
        }