gnome-keyring r1043 - in trunk: . pk pkix/tests
- From: nnielsen svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-keyring r1043 - in trunk: . pk pkix/tests
- Date: Thu, 7 Feb 2008 23:04:09 +0000 (GMT)
Author: nnielsen
Date: Thu Feb 7 23:04:08 2008
New Revision: 1043
URL: http://svn.gnome.org/viewvc/gnome-keyring?rev=1043&view=rev
Log:
* pk/gkr-pk-index.c:
* pk/gkr-pk-object-storage.c:
* pkix/tests/unit-test-pkix-parser.c: Fix assertions for an unknown
parsed type (ie: zero).
Modified:
trunk/ChangeLog
trunk/pk/gkr-pk-index.c
trunk/pk/gkr-pk-object-storage.c
trunk/pkix/tests/unit-test-pkix-parser.c
Modified: trunk/pk/gkr-pk-index.c
==============================================================================
--- trunk/pk/gkr-pk-index.c (original)
+++ trunk/pk/gkr-pk-index.c Thu Feb 7 23:04:08 2008
@@ -1096,6 +1096,7 @@
{
g_return_val_if_fail (GKR_IS_PK_OBJECT (obj), FALSE);
g_return_val_if_fail (field != NULL, FALSE);
+ g_return_val_if_fail (val, FALSE);
return update_pk_index_value (get_index_singleton (), obj->location, obj->unique,
field, obj, (WriteValueFunc)write_string_value, &val);
@@ -1107,6 +1108,7 @@
{
g_return_val_if_fail (uni, FALSE);
g_return_val_if_fail (field != NULL, FALSE);
+ g_return_val_if_fail (val, FALSE);
return update_pk_index_value (get_index_singleton (), location, uni, field,
NULL, (WriteValueFunc)write_string_value, &val);
Modified: trunk/pk/gkr-pk-object-storage.c
==============================================================================
--- trunk/pk/gkr-pk-object-storage.c (original)
+++ trunk/pk/gkr-pk-object-storage.c Thu Feb 7 23:04:08 2008
@@ -448,6 +448,9 @@
GQuark location = GPOINTER_TO_UINT (data);
GQuark type = GPOINTER_TO_UINT (value);
+ if (!type)
+ return;
+
/* Stash away the parsed type, in case we need it when prompting for a password */
gkr_pk_index_set_string_full (location, unique, "parsed-type",
g_quark_to_string (type));
Modified: trunk/pkix/tests/unit-test-pkix-parser.c
==============================================================================
--- trunk/pkix/tests/unit-test-pkix-parser.c (original)
+++ trunk/pkix/tests/unit-test-pkix-parser.c Thu Feb 7 23:04:08 2008
@@ -143,7 +143,6 @@
}
CuAssert (cu, "location is empty", loc != 0);
- CuAssert (cu, "type is zero", type != 0);
CuAssert (cu, "details is null", details != NULL);
g_print ("getting password 'booo' for: %s\n", details);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]