summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-09-11 18:13:51 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-09-11 18:15:37 +0200
commit31d606d42d3f2b0577c74af5778778c975d519ae (patch)
treec56f05ecea47b988bf989d9184489eca9adb3f55 /filter
parentb58777e6cd5ea1b3ef20ea81a6487635a1e19380 (diff)
...and fix previous commit cd8aeed1569222edd8bfd05d9d833f74b679fcd0
"Fix data races during CppunitTest_filter_xslt". (Funny how after each attempted fix, 'make CppunitTest_filter_xslt' succeeded multiple times in a row, and only started to fail ThreadSanitizer after pushing the attempted fix.) Change-Id: I24cab2dd1b068b02ccd4827cf8dcb11cf301d1c0
Diffstat (limited to 'filter')
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index 869643003edb..0fc7e434c1ea 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -364,17 +364,13 @@ namespace XSLT
void Reader::forceStateStopped()
{
- xsltTransformContextPtr tcontext;
- {
- std::unique_lock<std::mutex> g(m_mutex);
- tcontext = m_tcontext;
- }
- if (!tcontext)
+ std::unique_lock<std::mutex> g(m_mutex);
+ if (!m_tcontext)
return;
//tdf#100057 If we force a cancel, libxslt will of course just keep on going unless something
//tells it to stop. Here we force the stopped state so that libxslt will stop processing
//and so Reader::execute will complete and we can join cleanly
- tcontext->state = XSLT_STATE_STOPPED;
+ m_tcontext->state = XSLT_STATE_STOPPED;
}
Reader::~Reader()