diff --git a/database/Makefile b/database/Makefile index 0d78513..a760a8d 100644 --- a/database/Makefile +++ b/database/Makefile @@ -6,7 +6,7 @@ CXXFLAGS = -g -O0 -Wall -I/users/m4burns/thrift/include/thrift -I. -Igen-cpp else CXXFLAGS = -O3 -fexpensive-optimizations -ffast-math -fno-math-errno -Wall -I/users/m4burns/thrift/include/thrift -I. -Igen-cpp endif -LDFLAGS = /users/m4burns/thrift/lib//libthrift.a +LDFLAGS = /users/m4burns/thrift/lib/libthriftnb.a /users/m4burns/thrift/lib/libthrift.a -levent SOURCES = ConfigFile.cpp db.cpp db_if.cpp linus_sha1.c log.cpp nameserver.cpp sha1.cpp gen-cpp/pos_constants.cpp gen-cpp/Pos.cpp gen-cpp/pos_types.cpp diff --git a/database/gen-cpp/Pos_server.skeleton.cpp b/database/gen-cpp/Pos_server.skeleton.cpp index 17ea6e7..c6348ae 100644 --- a/database/gen-cpp/Pos_server.skeleton.cpp +++ b/database/gen-cpp/Pos_server.skeleton.cpp @@ -3,7 +3,7 @@ #include "Pos.h" #include -#include +#include #include #include #include @@ -161,11 +161,8 @@ int main(int argc, char **argv) { shared_ptr handler(new PosHandler()); shared_ptr processor(new PosProcessor(handler)); - shared_ptr serverTransport(new TServerSocket(port)); - shared_ptr transportFactory(new TBufferedTransportFactory()); - shared_ptr protocolFactory(new TBinaryProtocolFactory()); - TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory); + TNonblockingServer server(processor, port); server.serve(); return 0; }