From 965e43178736e6635cf27410e6d73f4ec0fdced2 Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 7 May 2010 09:31:26 +0000 Subject: LOTS of changes. libmicrohttpd fix for 'chunked' POST handling and LUA parameter checker from Pentominos among other things. --- server/src/session.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'server/src/session.cc') diff --git a/server/src/session.cc b/server/src/session.cc index 675bf56..74adb32 100644 --- a/server/src/session.cc +++ b/server/src/session.cc @@ -66,7 +66,7 @@ void Session::commit() JournalWriter *Session::journal() { if(_journal == NULL) { - _journal = + _journal = new JournalWriter(Conf::journal_commit_addr, Conf::journal_commit_port); } return _journal; @@ -114,6 +114,17 @@ size_t Sessions::size() return sessions.size(); } +SessionAutolock::SessionAutolock(Session &s) + : session(s) +{ + session.lock(); +} + +SessionAutolock::~SessionAutolock() +{ + session.unlock(); +} + #ifdef TEST_SESSION //deps: configuration.cc journalwriter.cc journal_commit.cc mutex.cc debug.cc //cflags: -I.. $(PTHREAD_CFLAGS) -- cgit v1.2.3