diff options
Diffstat (limited to 'server/src/macrotool/sunlock.cc')
-rw-r--r-- | server/src/macrotool/sunlock.cc | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/server/src/macrotool/sunlock.cc b/server/src/macrotool/sunlock.cc index e75e7de..be35101 100644 --- a/server/src/macrotool/sunlock.cc +++ b/server/src/macrotool/sunlock.cc @@ -27,16 +27,14 @@ */ #include "sunlock.h" -#include <pqxx/pqxx> +#include <config.h> #include <stdio.h> -#include "configuration.h" +#ifndef WITHOUT_DB -static const char usage_str[] = -" help Prints this helptext.\n" -" sid Sets the status of a session id in the database" - " to 'idle'.\n" -; +#include <pqxx/pqxx> + +#include "configuration.h" static void sunlock_uid(std::string uid) { @@ -65,6 +63,14 @@ static void sunlock_uid(std::string uid) work.commit(); } +#endif/* WITHOUT_DB */ + +static const char usage_str[] = +" help Prints this helptext.\n" +" sid Sets the status of a session id in the database" + " to 'idle'.\n" +; + void macrotool_sunlock(std::vector<std::string> params) { if(params.size() < 1) { @@ -77,7 +83,9 @@ void macrotool_sunlock(std::vector<std::string> params) return; } +#ifndef WITHOUT_DB sunlock_uid(params[0]); +#endif/* WITHOUT_DB */ } #ifdef TEST_SUNLOCK |