diff options
-rw-r--r-- | src/uscxml/server/HTTPServer.cpp | 9 | ||||
-rw-r--r-- | test/src/test-communication.cpp.old | 31 | ||||
-rw-r--r-- | test/src/test-completion.cpp.old | 20 |
3 files changed, 8 insertions, 52 deletions
diff --git a/src/uscxml/server/HTTPServer.cpp b/src/uscxml/server/HTTPServer.cpp index 2258ab0..358c819 100644 --- a/src/uscxml/server/HTTPServer.cpp +++ b/src/uscxml/server/HTTPServer.cpp @@ -173,7 +173,14 @@ HTTPServer* HTTPServer::getInstance(unsigned short port, unsigned short wsPort, evthread_use_windows_threads(); #endif _instance = new HTTPServer(port, wsPort, sslConf); - _instance->start(); + + // only start if we have something to do! +#if (defined EVENT_SSL_FOUND && defined OPENSSL_FOUND && defined OPENSSL_HAS_ELIPTIC_CURVES) + if (_instance->_httpHandle || _instance->_wsHandle || _instance->_sslHandle) +#else + if (_instance->_httpHandle || _instance->_wsHandle) +#endif + _instance->start(); } return _instance; } diff --git a/test/src/test-communication.cpp.old b/test/src/test-communication.cpp.old deleted file mode 100644 index a0cdbbd..0000000 --- a/test/src/test-communication.cpp.old +++ /dev/null @@ -1,31 +0,0 @@ -#include "uscxml/Interpreter.h" -#include <DOM/io/Stream.hpp> - -int main(int argc, char** argv) { - if (argc != 2) { - std::cerr << "Expected path to test-communication.scxml" << std::endl; - exit(EXIT_FAILURE); - } - - - using namespace uscxml; - std::list<Interpreter*> _interpreters; - -// Event e; -// e.compound["foo"] = Data("bar", Data::VERBATIM); -// e.compound["foo2"] = Data("bar2", Data::VERBATIM); -// std::cout << e.toDocument() << std::endl; - - int nrInterpreters = 1; - for (int i = 0; i < nrInterpreters; i++) { - _interpreters.push_back(Interpreter::fromURI(argv[1])); - _interpreters.back()->start(); - } - - std::list<Interpreter*>::iterator interIter = _interpreters.begin(); - while(interIter != _interpreters.end()) { - (*interIter)->join(); - interIter++; - } - -}
\ No newline at end of file diff --git a/test/src/test-completion.cpp.old b/test/src/test-completion.cpp.old deleted file mode 100644 index 67d8708..0000000 --- a/test/src/test-completion.cpp.old +++ /dev/null @@ -1,20 +0,0 @@ -#include "uscxml/Interpreter.h" -#include "uscxml/debug/SCXMLDotWriter.h" -#include <DOM/io/Stream.hpp> - -int main(int argc, char** argv) { - if (argc != 2) { - std::cerr << "Expected path to scxml document" << std::endl; - exit(EXIT_FAILURE); - } - - using namespace uscxml; - - Interpreter* interpreter = Interpreter::fromURI(argv[1]); - //SCXMLDotWriter::toDot("output.dot", interpreter); - - interpreter->interpret(); - - - return EXIT_SUCCESS; -}
\ No newline at end of file |