From e388de9cf524977c36b523e31ad9d75816207ff5 Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 29 Jul 2008 12:52:50 +0000 Subject: Added configure option to remove pentominos support. --- server/src/Makefile.am | 2 +- server/src/server.cc | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'server/src') diff --git a/server/src/Makefile.am b/server/src/Makefile.am index 6e197c2..93d830a 100644 --- a/server/src/Makefile.am +++ b/server/src/Makefile.am @@ -82,7 +82,7 @@ test_macroparser: macroparser.cc @../../tools/test macroparser.cc saxparser.cc exception.cc log.cc -lexpat -DXML="\"../xml\"" test_server: server.cc - @../../tools/test server.cc templateparser.cc saxparser.cc queryparser.cc queryhandler.cc luaquerymapper.cc tcpsocket.cc exception.cc log.cc configuration.cc transactionparser.cc widgetgenerator.cc -lexpat $(LUA_LIBS) $(CONFIG_LIBS) -DXML="\"../xml\"" + @../../tools/test server.cc templateparser.cc saxparser.cc queryparser.cc queryhandler.cc luaquerymapper.cc tcpsocket.cc exception.cc log.cc configuration.cc transactionparser.cc widgetgenerator.cc database.cc macroparser.cc xml_encode_decode.cc -lexpat $(LUA_LIBS) $(CONFIG_LIBS) $(PQXX_LIBS) $(PQXX_CXXFLAGS) -DXML="\"../xml\"" #killall -9 test_server diff --git a/server/src/server.cc b/server/src/server.cc index c0ec223..54a2616 100644 --- a/server/src/server.cc +++ b/server/src/server.cc @@ -129,7 +129,8 @@ static void connection(TCPSocket &socket) tp.parse(); Template *templ = tp.getTemplate(); - + +#ifndef WITHOUT_PENTOMINOS // Send the queries to Pentominos (if any) TCPSocket s; s.connect("localhost", 11108); @@ -151,7 +152,10 @@ static void connection(TCPSocket &socket) std::string result = qh.exec(); printf("Got result: [%s]\n", result.c_str()); - +#else + std::string result = ""; +#endif/*WITHOUT_PENTOMINOS*/ + // Parse the result from the queries to pentominos QueryParser qp(result); qp.parse(); -- cgit v1.2.3