diff options
Diffstat (limited to 'src/common/gsignond-identity-info.c')
-rw-r--r-- | src/common/gsignond-identity-info.c | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/src/common/gsignond-identity-info.c b/src/common/gsignond-identity-info.c index 9e41a41..02af6c3 100644 --- a/src/common/gsignond-identity-info.c +++ b/src/common/gsignond-identity-info.c @@ -23,7 +23,7 @@ * 02110-1301 USA */ -#include <gsignond/gsignond-identity-info.h> +#include "gsignond-identity-info.h" #include "gsignond-identity-info-internal.h" @@ -35,16 +35,25 @@ _gsignond_identity_info_seq_cmp ( GSequenceIter *iter1 = NULL, *iter2 = NULL; gboolean equal = TRUE; - if (one == NULL && two == NULL) + if (one == two) return TRUE; - if ((one != NULL && two == NULL) || - (one == NULL && two != NULL) || - (g_sequence_get_length (one) != g_sequence_get_length (two))) - return FALSE; + if (one == NULL) { + if (g_sequence_get_length (two) == 0) + return TRUE; + else + return FALSE; + } + + if (two == NULL) { + if (g_sequence_get_length (one) == 0) + return TRUE; + else + return FALSE; + } - if (one == two) - return TRUE; + if (g_sequence_get_length (one) != g_sequence_get_length (two)) + return FALSE; iter1 = g_sequence_get_begin_iter (one); while (!g_sequence_iter_is_end (iter1)) { @@ -222,7 +231,7 @@ _gsignond_identity_info_methods_cmp ( * * Creates new instance of GSignondIdentityInfo. * - * Returns: (transfer full) #GSignondIdentityInfo object if successful, + * Returns: (transfer full): #GSignondIdentityInfo object if successful, * NULL otherwise. */ GSignondIdentityInfo * @@ -629,7 +638,7 @@ gsignond_identity_info_set_caption ( * * Retrieves the realms from the info. * - * Returns: (transfer full) the realms if successful, NULL Otherwise. + * Returns: (transfer full): the realms if successful, NULL Otherwise. * when done realms should be freed using g_sequence_free. */ GSequence * @@ -649,7 +658,7 @@ gsignond_identity_info_get_realms (GSignondIdentityInfo *info) * gsignond_identity_info_set_realms: * @info: instance of #GSignondIdentityInfo * - * @realms: (transfer none) realms to be set + * @realms: (transfer none): realms to be set * * Sets the realms of the info. * @@ -674,9 +683,9 @@ gsignond_identity_info_set_realms ( * @info: instance of #GSignondIdentityInfo * * Retrieves the methods from the info whereas #GHashTable consists of - * <gchar*,GSequence*> and #GSequence is a sequence of gchar *. + * (gchar*,GSequence*) and #GSequence is a sequence of gchar *. * - * Returns: (transfer full) the methods if successful, NULL otherwise. + * Returns: (transfer full): the methods if successful, NULL otherwise. * when done, methods should be freed using g_hash_table_unref. */ GHashTable * @@ -714,8 +723,8 @@ gsignond_identity_info_get_methods (GSignondIdentityInfo *info) * gsignond_identity_info_set_methods: * @info: instance of #GSignondIdentityInfo * - * @methods: (transfer none) methods to be set whereas #GHashTable consists of - * <gchar*,#GSequence*> and #GSequence is a sequence of gchar *. + * @methods: (transfer none): methods to be set whereas #GHashTable consists of + * (gchar*,#GSequence*) and #GSequence is a sequence of gchar *. * * Sets the methods of the info. * @@ -762,7 +771,7 @@ gsignond_identity_info_set_methods ( * * Retrieves the mechanisms from the info. * - * Returns: (transfer full) the mechanisms if successful, NULL otherwise. + * Returns: (transfer full): the mechanisms if successful, NULL otherwise. * when done, mechanisms should be freed using g_sequence_free; #GSequence is a * sequence of gchar *. */ @@ -837,7 +846,7 @@ gsignond_identity_info_remove_method ( * * Retrieves the access control list from the info. * - * Returns: (transfer full) the list if successful, NULL otherwise. + * Returns: (transfer full): the list if successful, NULL otherwise. * when done, list should be freed using gsignond_security_context_list_free. */ GSignondSecurityContextList * @@ -857,7 +866,7 @@ gsignond_identity_info_get_access_control_list (GSignondIdentityInfo *info) * gsignond_identity_info_set_access_control_list: * @info: instance of #GSignondIdentityInfo * - * @acl: (transfer none) access control list to be set + * @acl: (transfer none): access control list to be set * * Sets the access control list of the info. * @@ -883,7 +892,7 @@ gsignond_identity_info_set_access_control_list ( * * Retrieves the id from the info. * - * Returns: (transfer full) the owner if successful, NULL otherwise. + * Returns: (transfer full): the owner if successful, NULL otherwise. * when done, owner list should be freed using * gsignond_security_context_free. */ @@ -904,7 +913,7 @@ gsignond_identity_info_get_owner (GSignondIdentityInfo *info) * gsignond_identity_info_set_owner: * @info: instance of #GSignondIdentityInfo * - * @owners: (transfer none) owner to be set + * @owners: (transfer none): owner to be set * * Sets the owner of the info. * |