summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-03-31 23:58:37 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-03-31 23:58:37 (GMT)
commitc912952fb5e8072770262c64932c1d8cf2027cf0 (patch)
treed21ae1340c96f9fe1105f9cdaa62d84342f58cd9 /src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
parentf64620e28a55dbddaeeefef2e7b8a6a433f21c82 (diff)
downloaduscxml-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/USCXMLInvoker.cpp')
-rw-r--r--src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp21
1 files changed, 15 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);