summaryrefslogtreecommitdiffstats
path: root/apps/uscxml-browser.cpp
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2017-06-12 14:37:12 (GMT)
committerStefan Radomski <github@mintwerk.de>2017-06-12 14:37:12 (GMT)
commitbfdd2f8e72005d1e2ef2a87d19d8ac242bb22557 (patch)
tree5c3e73450534bd8b4279d20f0171dcfb45167786 /apps/uscxml-browser.cpp
parent090016a3f5bcd66d6265fe1504430430f1dee7ed (diff)
downloaduscxml-bfdd2f8e72005d1e2ef2a87d19d8ac242bb22557.zip
uscxml-bfdd2f8e72005d1e2ef2a87d19d8ac242bb22557.tar.gz
uscxml-bfdd2f8e72005d1e2ef2a87d19d8ac242bb22557.tar.bz2
respond element and proper http ioproc
Diffstat (limited to 'apps/uscxml-browser.cpp')
-rw-r--r--apps/uscxml-browser.cpp42
1 files changed, 24 insertions, 18 deletions
diff --git a/apps/uscxml-browser.cpp b/apps/uscxml-browser.cpp
index 6a16f98..dd0633b 100644
--- a/apps/uscxml-browser.cpp
+++ b/apps/uscxml-browser.cpp
@@ -25,23 +25,25 @@ int main(int argc, char** argv) {
InterpreterOptions::printUsageAndExit(argv[0]);
}
- // setup HTTP server
- HTTPServer::SSLConfig* sslConf = NULL;
- if (options.certificate.length() > 0) {
- sslConf = new HTTPServer::SSLConfig();
- sslConf->privateKey = options.certificate;
- sslConf->publicKey = options.certificate;
- sslConf->port = options.httpsPort;
-
- } else if (options.privateKey.length() > 0 && options.publicKey.length() > 0) {
- sslConf = new HTTPServer::SSLConfig();
- sslConf->privateKey = options.privateKey;
- sslConf->publicKey = options.publicKey;
- sslConf->port = options.httpsPort;
-
- }
- HTTPServer::getInstance(options.httpPort, options.wsPort, sslConf);
+ if (!options.validate) {
+ // setup HTTP server
+ HTTPServer::SSLConfig* sslConf = NULL;
+ if (options.certificate.length() > 0) {
+ sslConf = new HTTPServer::SSLConfig();
+ sslConf->privateKey = options.certificate;
+ sslConf->publicKey = options.certificate;
+ sslConf->port = options.httpsPort;
+
+ } else if (options.privateKey.length() > 0 && options.publicKey.length() > 0) {
+ sslConf = new HTTPServer::SSLConfig();
+ sslConf->privateKey = options.privateKey;
+ sslConf->publicKey = options.publicKey;
+ sslConf->port = options.httpsPort;
+ }
+ HTTPServer::getInstance(options.httpPort, options.wsPort, sslConf);
+ }
+
if (options.pluginPath.length() > 0) {
Factory::setDefaultPluginPath(options.pluginPath);
}
@@ -55,7 +57,7 @@ int main(int argc, char** argv) {
for(size_t i = 0; i < options.interpreters.size(); i++) {
// InterpreterOptions* currOptions = options.interpreters[0].second;
- std::string documentURL = options.interpreters[0].first;
+ std::string documentURL = options.interpreters[i].first;
LOGD(USCXML_INFO) << "Processing " << documentURL << std::endl;
@@ -71,7 +73,7 @@ int main(int argc, char** argv) {
if (issues.size() == 0) {
LOGD(USCXML_DEBUG) << "No issues found" << std::endl;
}
-
+
}
if (options.verbose) {
@@ -90,6 +92,10 @@ int main(int argc, char** argv) {
}
}
+ if (options.validate) {
+ return EXIT_SUCCESS;
+ }
+
if (options.withDebugger) {
DebuggerServlet* debugger;
debugger = new DebuggerServlet();