diff options
author | deva <deva> | 2011-01-25 12:17:47 +0000 |
---|---|---|
committer | deva <deva> | 2011-01-25 12:17:47 +0000 |
commit | 13f286925b1e9e34fe71413edcba23686c005f8a (patch) | |
tree | d1ea04756f6eb198fb18a367423670734e6e062a /server/src/transactionhandler.cc | |
parent | 1680325095c79bd66c13e6e0bd9fb6340c83a1e0 (diff) |
New database layout.
Diffstat (limited to 'server/src/transactionhandler.cc')
-rw-r--r-- | server/src/transactionhandler.cc | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/server/src/transactionhandler.cc b/server/src/transactionhandler.cc index 5a4bc6a..8ebbd69 100644 --- a/server/src/transactionhandler.cc +++ b/server/src/transactionhandler.cc @@ -246,16 +246,21 @@ static std::string handleRequest(Transaction &transaction, Environment &env, std::string resume = db->getResume(transaction.cpr, macro, time(NULL) - Conf::db_max_ttl); - - if(resume == jresume) state = "new"; - - if(jresume != "" && resume != jresume) { + if(session.journal()->dirty(macro.attributes["name"])) { state = "dirty"; - session.journal()->removeEntry(macro.attributes["name"]); + } else { + if(resume == jresume) { + state = "new"; + } else { + if(jresume != "") { + state = "dirty"; + session.journal()->setDirty(macro.attributes["name"]); + } else { + state = "old"; + } + } } - if(jresume == "" && resume != jresume) state = "old"; - answer += " <resume state=\""+state+"\">"; answer += xml_encode(resume); answer += "</resume>\n"; |