Change Persist Thread to a 30 Second delayed, run once on changes.

This commit is contained in:
Jim Norman
2005-10-27 19:24:13 +00:00
parent bb67a93ec8
commit 2483c16c08
7 changed files with 55 additions and 16 deletions

View File

@@ -208,7 +208,9 @@ namespace sscs.verbs
{
KeyChain kc = ssStore.GetKeyChain(sKeyChainID);
kc.RemoveAllSecrets();
ssStore.UpdatePersistentStore();
}
return wo;
}
@@ -243,7 +245,8 @@ namespace sscs.verbs
{
secret = keyChain.GetSecret(secretID);
secret.RemoveKeyValue(keyID);
wo.SetError(constants.RetCodes.SUCCESS, null);
wo.SetError(constants.RetCodes.SUCCESS, null);
ssStore.UpdatePersistentStore();
}
}
catch (Exception e)
@@ -348,6 +351,7 @@ namespace sscs.verbs
ChangeLinkedKeys(keyChain, secret, keyID, sValue);
wo.SetError(constants.RetCodes.SUCCESS, null);
ssStore.UpdatePersistentStore();
}
else
wo.SetError(constants.RetCodes.FAILURE, null);
@@ -392,6 +396,7 @@ namespace sscs.verbs
// now call the traget to change it's linked ones
ChangeLinkedKeys(keyChain, targetSecret, key, valStr);
}
}
}
@@ -613,6 +618,7 @@ namespace sscs.verbs
Secret targetSecret = keyChain.GetSecret(lki.GetLinkedSecretID());
KeyValue targetkv = targetSecret.GetKeyValue(lki.GetLinkedKeyID());
targetkv.RemoveLink(secretID+":"+keyID);
ssStore.UpdatePersistentStore();
return wo;
}
@@ -638,6 +644,7 @@ namespace sscs.verbs
Secret target = keyChain.GetSecret(lki.GetLinkedSecretID());
KeyValue targetkv = target.GetKeyValue(lki.GetLinkedKeyID());
targetkv.AddLink(new LinkedKeyInfo(secretID, keyID));
ssStore.UpdatePersistentStore();
}
catch (Exception e)
{

View File

@@ -87,6 +87,7 @@ namespace sscs.verbs
{
// TODO: get the secret and remove linked keys
keyChain.RemoveSecret(secretId);
ssStore.UpdatePersistentStore();
}
}
else

View File

@@ -187,6 +187,7 @@ namespace sscs.verbs
// Now change all values for linked keys
ChangeLinkedKeys(keyChain, secret, key, valStr);
ssStore.UpdatePersistentStore();
}
else

View File

@@ -172,6 +172,7 @@ namespace sscs.verbs
}
}
ssStore.StartPersistenceByDesktopPasswd(passwd);
ssStore.UpdatePersistentStore();
}
}
else