diff options
Diffstat (limited to 'src/uscxml/server')
-rw-r--r-- | src/uscxml/server/HTTPServer.cpp | 3 | ||||
-rw-r--r-- | src/uscxml/server/InterpreterServlet.h | 16 |
2 files changed, 10 insertions, 9 deletions
diff --git a/src/uscxml/server/HTTPServer.cpp b/src/uscxml/server/HTTPServer.cpp index 2d2b5e0..3e7920c 100644 --- a/src/uscxml/server/HTTPServer.cpp +++ b/src/uscxml/server/HTTPServer.cpp @@ -179,6 +179,7 @@ tthread::recursive_mutex HTTPServer::_instanceMutex; HTTPServer* HTTPServer::getInstance(unsigned short port, unsigned short wsPort, SSLConfig* sslConf) { // tthread::lock_guard<tthread::recursive_mutex> lock(_instanceMutex); if (_instance == NULL) { + std::cout << "Instantiating new HTTPServer" << std::endl; #ifdef _WIN32 WSADATA wsaData; WSAStartup(MAKEWORD(2, 2), &wsaData); @@ -561,7 +562,7 @@ bool HTTPServer::registerServlet(const std::string& path, HTTPServlet* servlet) HTTPServer* INSTANCE = getInstance(); if (!INSTANCE->_httpHandle) - return true; + return true; // this is the culprit! tthread::lock_guard<tthread::recursive_mutex> lock(INSTANCE->_mutex); diff --git a/src/uscxml/server/InterpreterServlet.h b/src/uscxml/server/InterpreterServlet.h index 0315598..9ff1d34 100644 --- a/src/uscxml/server/InterpreterServlet.h +++ b/src/uscxml/server/InterpreterServlet.h @@ -35,10 +35,10 @@ public: virtual boost::shared_ptr<IOProcessorImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("http"); - names.insert("http://www.w3.org/TR/scxml/#HTTPEventProcessor"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("http"); + names.push_back("http://www.w3.org/TR/scxml/#HTTPEventProcessor"); return names; } @@ -86,10 +86,10 @@ public: virtual boost::shared_ptr<IOProcessorImpl> create(InterpreterImpl* interpreter); - virtual std::set<std::string> getNames() { - std::set<std::string> names; - names.insert("websocket"); - names.insert("http://www.w3.org/TR/scxml/#WebSocketEventProcessor"); + virtual std::list<std::string> getNames() { + std::list<std::string> names; + names.push_back("websocket"); + names.push_back("http://www.w3.org/TR/scxml/#WebSocketEventProcessor"); return names; } |