diff options
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"; |