diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-03-31 23:58:37 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-03-31 23:58:37 (GMT) |
commit | c912952fb5e8072770262c64932c1d8cf2027cf0 (patch) | |
tree | d21ae1340c96f9fe1105f9cdaa62d84342f58cd9 /src/uscxml/plugins/invoker/scxml | |
parent | f64620e28a55dbddaeeefef2e7b8a6a433f21c82 (diff) | |
download | uscxml-c912952fb5e8072770262c64932c1d8cf2027cf0.zip uscxml-c912952fb5e8072770262c64932c1d8cf2027cf0.tar.gz uscxml-c912952fb5e8072770262c64932c1d8cf2027cf0.tar.bz2 |
Various bug-fixes for W3C test conformance and stack traces with exceptions and segfaults
Diffstat (limited to 'src/uscxml/plugins/invoker/scxml')
-rw-r--r-- | src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp | 21 | ||||
-rw-r--r-- | src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h | 1 |
2 files changed, 16 insertions, 6 deletions
diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp index c0e87d7..292b79e 100644 --- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp +++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp @@ -15,11 +15,12 @@ bool connect(pluma::Host& host) { } #endif -USCXMLInvoker::USCXMLInvoker() { + USCXMLInvoker::USCXMLInvoker() : _cancelled(false) { } USCXMLInvoker::~USCXMLInvoker() { + _cancelled = true; delete _invokedInterpreter; }; @@ -35,7 +36,7 @@ Data USCXMLInvoker::getDataModelVariables() { } void USCXMLInvoker::send(const SendRequest& req) { - assert(false); + _invokedInterpreter->_externalQueue.push(req); } void USCXMLInvoker::cancel(const std::string sendId) { @@ -50,11 +51,11 @@ void USCXMLInvoker::invoke(const InvokeRequest& req) { } else { LOG(ERROR) << "Cannot invoke nested SCXML interpreter, neither src attribute nor DOM is given"; } - DataModel dataModel(_invokedInterpreter->getDataModel()); - if (dataModel) { - - } if (_invokedInterpreter) { + DataModel dataModel(_invokedInterpreter->getDataModel()); + if (dataModel) { + + } _invokedInterpreter->setParentQueue(this); // transfer namespace prefixes _invokedInterpreter->_nsURL = _parentInterpreter->_nsURL; @@ -66,11 +67,19 @@ void USCXMLInvoker::invoke(const InvokeRequest& req) { nsIter++; } _invokedInterpreter->_xmlNSPrefix = _parentInterpreter->_xmlNSPrefix; + _invokedInterpreter->_sessionId = req.invokeid; + + /// test240 assumes that invoke request params will carry over to the datamodel + _invokedInterpreter->setInvokeRequest(req); + _invokedInterpreter->start(); } } void USCXMLInvoker::push(const SendRequest& event) { + // test 252 + if (_cancelled) + return; SendRequest copyEvent(event); copyEvent.invokeid = _invokeId; _parentInterpreter->receive(copyEvent); diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h index 857ffe2..b1386b1 100644 --- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h +++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h @@ -38,6 +38,7 @@ public: virtual void push(const SendRequest& event); protected: + bool _cancelled; Interpreter* _invokedInterpreter; Interpreter* _parentInterpreter; }; |