diff options
author | U-t500\tade <tade@t500.(none)> | 2013-03-02 18:02:28 +0100 |
---|---|---|
committer | U-t500\tade <tade@t500.(none)> | 2013-03-02 18:02:28 +0100 |
commit | 6eb47eb0a6f34e817f372455087fba5dad222461 (patch) | |
tree | 06ac102d215a0bcb1010328e251cb941dea2b7d1 /src/AntFr310XT.cpp | |
parent | 17f64c25a2fa908e732e60a6d0f964ec1ac44add (diff) |
bugfix: avoid segfaults
stop() was not reentrant, and we should not call it from different threads
Diffstat (limited to 'src/AntFr310XT.cpp')
-rw-r--r-- | src/AntFr310XT.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/AntFr310XT.cpp b/src/AntFr310XT.cpp index 89b2b5a..7178225 100644 --- a/src/AntFr310XT.cpp +++ b/src/AntFr310XT.cpp @@ -185,6 +185,7 @@ AntFr310XT2::start() void AntFr310XT2::stop() { m_eventThKill = 1; + //m_eventTh.join(); m_antMessenger->kill(); if(m_serial->isOpen()) { @@ -194,9 +195,15 @@ void AntFr310XT2::stop() m_antMessenger->ANT_ResetSystem(); } m_serial->close(); + changeState(ST_ANTFS_START0); +} + +void AntFr310XT2::stopAsync() +{ changeState(ST_ANTFS_LAST); } + const int AntFr310XT2::getSMState() const { |