Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2015-07-21 15:46:32 +0300
committerHieu Hoang <hieuhoang@gmail.com>2015-07-21 15:46:32 +0300
commitc989b8f34aec4e2ba07fd053cb70d944341ba6c1 (patch)
treec48ac7f5e547bbada85b5ed00946dac311a13bdc
parent8eedb3ffbcf44ac836daefdb6af9618629042625 (diff)
apply Pidong Wang's patch for server to new server code in moses/
-rw-r--r--contrib/server/Jamfile2
-rw-r--r--moses/ExportInterface.cpp11
2 files changed, 10 insertions, 3 deletions
diff --git a/contrib/server/Jamfile b/contrib/server/Jamfile
index 048e540b0..d6f9cdc13 100644
--- a/contrib/server/Jamfile
+++ b/contrib/server/Jamfile
@@ -13,7 +13,7 @@ with-xmlrpc-c = [ option.get "with-xmlrpc-c" ] ;
if $(with-xmlrpc-c) {
echo While building mosesserver ... ;
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ;
- echo "!!! You are linking the XMLRPC-C library; Do NOT use v.1.25.29 !!!" ;
+ echo "!!! You are linking the XMLRPC-C library; Must be v.1.32 (September 2012) or higher !!!" ;
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ;
build-moses-server = true ;
diff --git a/moses/ExportInterface.cpp b/moses/ExportInterface.cpp
index 54121609b..f457d4879 100644
--- a/moses/ExportInterface.cpp
+++ b/moses/ExportInterface.cpp
@@ -167,8 +167,15 @@ run_as_server()
myRegistry.addMethod("updater", updater);
myRegistry.addMethod("optimize", optimizer);
- xmlrpc_c::serverAbyss myAbyssServer(myRegistry, port, logfile);
-
+ xmlrpc_c::serverAbyss myAbyssServer(
+ xmlrpc_c::serverAbyss::constrOpt()
+ .registryP(&myRegistry)
+ .portNumber(port) // TCP port on which to listen
+ .logFileName(logfile)
+ .allowOrigin("*")
+ .maxConn((unsigned int)num_threads)
+ );
+
XVERBOSE(1,"Listening on port " << port << endl);
if (isSerial) {
while(1) myAbyssServer.runOnce();