diff options
author | deva <deva> | 2010-05-07 09:31:26 +0000 |
---|---|---|
committer | deva <deva> | 2010-05-07 09:31:26 +0000 |
commit | 965e43178736e6635cf27410e6d73f4ec0fdced2 (patch) | |
tree | 7cc297f68e93f6974baaf185259ac88f35df0355 /server/src/transactionhandler.cc | |
parent | 3241d29dec9beb0c367340465bd8d9bcab863692 (diff) |
LOTS of changes. libmicrohttpd fix for 'chunked' POST handling and LUA parameter checker from Pentominos among other things.
Diffstat (limited to 'server/src/transactionhandler.cc')
-rw-r--r-- | server/src/transactionhandler.cc | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/server/src/transactionhandler.cc b/server/src/transactionhandler.cc index a042a6b..7a45800 100644 --- a/server/src/transactionhandler.cc +++ b/server/src/transactionhandler.cc @@ -48,7 +48,8 @@ static std::string error_box(std::string message) return errorbox; } -static std::string handleCommits(Transaction &transaction, Environment &env, Session &session) +static std::string handleCommits(Transaction &transaction, Environment &env, + Session &session) { std::string answer; @@ -66,7 +67,8 @@ static std::string handleCommits(Transaction &transaction, Environment &env, Ses std::string resume = resume_parser(macro->resume, commit); commit.fields["journal.resume"] = resume; - db->commitTransaction(transaction.user, transaction.cpr, *macro, commit.fields); + db->commitTransaction(transaction.user, transaction.cpr, *macro, + commit.fields); if(resume != "") { @@ -84,7 +86,8 @@ static std::string handleCommits(Transaction &transaction, Environment &env, Ses return answer; } -static std::string handleRequest(Transaction &transaction, Environment &env, Session &session) +static std::string handleRequest(Transaction &transaction, Environment &env, + Session &session) { std::string answer; @@ -120,7 +123,8 @@ static std::string handleRequest(Transaction &transaction, Environment &env, Ses Macro ¯o = (*mi2); if(macro.isHeader) { - answer += " <header caption=\"" + macro.attributes["caption"] + "\"/>\n"; + answer += " <header caption=\"" + macro.attributes["caption"] + + "\"/>\n"; mi2++; continue; } @@ -133,7 +137,8 @@ static std::string handleRequest(Transaction &transaction, Environment &env, Ses if(completed) answer += "\"true\""; else answer += "\"false\""; - std::map< std::string, std::string >::iterator ai = macro.attributes.begin(); + std::map< std::string, std::string >::iterator ai = + macro.attributes.begin(); while(ai != macro.attributes.end()) { std::string name = ai->first; std::string value = ai->second; @@ -167,7 +172,8 @@ static std::string handleRequest(Transaction &transaction, Environment &env, Ses if(service == "pentominos") { // Send the queries to Pentominos (if any) - QueryHandlerPentominos qh(*atf, transaction.cpr, "pracrod"); + QueryHandlerPentominos qh(*atf, transaction.cpr, + "pracrod"/*user*/); QueryResult queryresult = qh.exec(*qi); lqm.addQueryResult(queryresult); @@ -190,7 +196,8 @@ static std::string handleRequest(Transaction &transaction, Environment &env, Ses std::vector< Script >::iterator spi = m->scripts.begin(); while(spi != m->scripts.end()) { - answer += " <script language=\"" + spi->attributes["language"] + answer += " <script language=\"" + + spi->attributes["language"] + "\" name=\"" + spi->attributes["name"] + "\">\n"; answer += xml_encode(spi->attributes["code"]); answer += "\n </script>\n"; @@ -212,7 +219,8 @@ static std::string handleRequest(Transaction &transaction, Environment &env, Ses if(completed) { answer += " <resume>"; - answer += db->getResume(transaction.cpr, macro, time(NULL) - Conf::db_max_ttl); + answer += db->getResume(transaction.cpr, macro, time(NULL) - + Conf::db_max_ttl); answer += "</resume>\n"; } @@ -233,7 +241,8 @@ static std::string handleRequest(Transaction &transaction, Environment &env, Ses return answer; } -std::string handleTransaction(Transaction &transaction, Environment &env, Session &session) +std::string handleTransaction(Transaction &transaction, Environment &env, + Session &session) { std::string answer; |