Updates to reflect changes to set_db_config() in ConfigMicro.

This commit is contained in:
Chris 2012-04-11 11:23:40 +01:00
parent 019981fb42
commit c6f0d7c1fc
2 changed files with 2 additions and 2 deletions

View File

@ -136,7 +136,7 @@ sub unique_id {
# Potentially not atomic, but putting something in place that is really isn't worth it right now...
my $id = $self -> {"settings"} -> {"config"} -> {"Auth:unique_id"};
$self -> {"settings"} -> set_db_config($self -> {"dbh"}, $self -> {"settings"} -> {"database"} -> {"settings"}, "Auth:unique_id", ++$id);
$self -> {"settings"} -> set_db_config("Auth:unique_id", ++$id);
# Ask urandom for some randomness to combat potential problems with the above non-atomicity
my $buffer;

View File

@ -591,7 +591,7 @@ sub session_cleanup {
# We only want to run the garbage collect occasionally
if($self -> {"settings"} -> {"config"} -> {"Session:lastgc"} < $now - $self -> {"auth"} -> get_config("session_gc")) {
# Okay, we're due a garbage collect, update the config to reflect that we're doing it
$self -> {"settings"} -> set_db_config($self -> {"dbh"}, $self -> {"settings"} -> {"database"} -> {"settings"}, "Session:lastgc", $now);
$self -> {"settings"} -> set_db_config("Session:lastgc", $now);
# Remove expired guest sessions first
my $nukesess = $self -> {"dbh"} -> prepare("DELETE FROM ".$self -> {"settings"} -> {"database"} -> {"sessions"}.