- Fix for writing secrets into the default Wallet instead of

writing into CASAWallet.
- Changed the port attribute in Keyring from string to unit32.
This commit is contained in:
smanojna
2006-03-07 09:40:28 +00:00
parent d7ed360f66
commit 52f11fa9cd
3 changed files with 78 additions and 7 deletions

View File

@@ -631,8 +631,16 @@ CreateItemInKeyring(char *keyring, int32_t itemType, char *display_name, char *s
{
//printf("as.gk.c : CreateItemInKeyring : In key %s \n", attrs[i]->key);
attribute.name = g_strdup (attrs[i]->key);
attribute.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING;
attribute.value.string = g_strdup (attrs[i]->value);
if( !strcmp(attrs[i]->key, "port"))
{
attribute.type = GNOME_KEYRING_ATTRIBUTE_TYPE_UINT32;
attribute.value.integer = atoi(attrs[i]->value);
}
else
{
attribute.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING;
attribute.value.string = g_strdup(attrs[i]->value);
}
g_array_append_val (attributes, attribute);
}
@@ -908,8 +916,16 @@ SetItemAttributes (char *keyring, guint32 itemid, Attribute **attrs, int length)
{
//printf("ad_gk.c : In key %s \n", attrs[i]->key);
attribute.name = g_strdup (attrs[i]->key);
attribute.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING;
attribute.value.string = g_strdup (attrs[i]->value);
if( !strcmp(attrs[i]->key, "port"))
{
attribute.type = GNOME_KEYRING_ATTRIBUTE_TYPE_UINT32;
attribute.value.integer = atoi(attrs[i]->value);
}
else
{
attribute.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING;
attribute.value.string = g_strdup(attrs[i]->value);
}
g_array_append_val (attributes, attribute);
}
gnome_keyring_item_set_attributes (keyring, itemid, attributes,