##// END OF EJS Templates
Removed crash on spwplugin while closing the manager thread didn't quit correctly.
Alexis Jeandet -
r82:f085b545eb20 socexplorer-plugins-0.7-2 default draft
parent child
Show More
@@ -1,8 +1,8
1 %global upstream_name socexplorer-plugins-0.7-0
1 %global upstream_name socexplorer-plugins-0.7-2
2
2
3 Name: socexplorer-plugins
3 Name: socexplorer-plugins
4 Version: 0.7
4 Version: 0.7
5 Release: 0%{?dist}
5 Release: 2%{?dist}
6 Summary: Base plugins for SocExplorer.
6 Summary: Base plugins for SocExplorer.
7 Group: Development/Tools
7 Group: Development/Tools
8 License: GPLv2
8 License: GPLv2
@@ -65,6 +65,12 make install INSTALL_ROOT=%{buildroot}
65 %{_qt5_libdir}/SocExplorer/plugins/libspwplugin.so*
65 %{_qt5_libdir}/SocExplorer/plugins/libspwplugin.so*
66
66
67 %changelog
67 %changelog
68 * Fri May 13 2016 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.7-2
69 - Fixed another segfault on SpwPlugin.
70
71 * Thu Apr 21 2016 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.7-1
72 - Fixed segfault on SpwPlugin.
73
68 * Wed Apr 20 2016 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.7-0
74 * Wed Apr 20 2016 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.7-0
69 - Updated to SocExplorer 0.7, some work on spwplugin merged.
75 - Updated to SocExplorer 0.7, some work on spwplugin merged.
70
76
@@ -49,8 +49,7 stardundeeSPW_USB::stardundeeSPW_USB(soc
49
49
50 stardundeeSPW_USB::~stardundeeSPW_USB()
50 stardundeeSPW_USB::~stardundeeSPW_USB()
51 {
51 {
52 this->manager->requestInterruption();
52
53 while(this->manager->isRunning());
54 }
53 }
55
54
56 void stardundeeSPW_USB::toggleBridgeConnection()
55 void stardundeeSPW_USB::toggleBridgeConnection()
@@ -411,6 +410,9 stardundeeSPW_USB_Manager::stardundeeSPW
411
410
412 stardundeeSPW_USB_Manager::~stardundeeSPW_USB_Manager()
411 stardundeeSPW_USB_Manager::~stardundeeSPW_USB_Manager()
413 {
412 {
413 if(this->connected)disconnectBridge();
414 this->requestInterruption();
415 while(!this->isFinished());
414 }
416 }
415
417
416 void stardundeeSPW_USB_Manager::run()
418 void stardundeeSPW_USB_Manager::run()
@@ -420,7 +422,7 void stardundeeSPW_USB_Manager::run()
420 USB_SPACEWIRE_STATUS stat;
422 USB_SPACEWIRE_STATUS stat;
421 SocExplorerEngine::message(this->plugin,"Starting Startdundee USB pooling thread",1);
423 SocExplorerEngine::message(this->plugin,"Starting Startdundee USB pooling thread",1);
422 char buffer[(RMAP_MAX_XFER_SIZE*4)+50];
424 char buffer[(RMAP_MAX_XFER_SIZE*4)+50];
423 while (!this->isInterruptionRequested())
425 while (!QThread::currentThread()->isInterruptionRequested())
424 {
426 {
425 if(this->connected)
427 if(this->connected)
426 {
428 {
@@ -913,6 +915,7 bool stardundeeSPW_USB_Manager::disconne
913 this->RMAP_Answers.clear();
915 this->RMAP_Answers.clear();
914 this->RMAP_AnswersMtx->unlock();
916 this->RMAP_AnswersMtx->unlock();
915 this->RMAP_AnswersSem->acquire(this->RMAP_AnswersSem->available());
917 this->RMAP_AnswersSem->acquire(this->RMAP_AnswersSem->available());
918 this->connected=false;
916 return true;
919 return true;
917 }
920 }
918
921
@@ -47,8 +47,8 class stardundeeSPW_USB_Manager: public
47 public:
47 public:
48 explicit stardundeeSPW_USB_Manager(socexplorerplugin *plugin = 0,QObject* parent=0);
48 explicit stardundeeSPW_USB_Manager(socexplorerplugin *plugin = 0,QObject* parent=0);
49 ~stardundeeSPW_USB_Manager();
49 ~stardundeeSPW_USB_Manager();
50 void run();
50 virtual void run();
51 bool connectBridge();
51 virtual bool connectBridge();
52 bool connectBridgeAsInterface();
52 bool connectBridgeAsInterface();
53 bool connectBridgeAsRouter();
53 bool connectBridgeAsRouter();
54 void initDialog( void );
54 void initDialog( void );
@@ -57,8 +57,8 public:
57 void initializeTimecodeGeneration();
57 void initializeTimecodeGeneration();
58 void setTimecodeFrequency(double requestedFrequency);
58 void setTimecodeFrequency(double requestedFrequency);
59 unsigned int getLinkStatus(unsigned char link);
59 unsigned int getLinkStatus(unsigned char link);
60 bool disconnectBridge();
60 virtual bool disconnectBridge();
61 bool sendPacket(char* packet,int size);
61 virtual bool sendPacket(char* packet,int size);
62
62
63 signals:
63 signals:
64 void updateAvailableBrickCount(int count);
64 void updateAvailableBrickCount(int count);
@@ -73,11 +73,8 abstractSpwManager::abstractSpwManager(s
73
73
74 abstractSpwManager::~abstractSpwManager()
74 abstractSpwManager::~abstractSpwManager()
75 {
75 {
76 this->terminate();
76 this->requestInterruption();
77 while (!this->isFinished())
77 while(!this->isFinished());
78 {
79 this->usleep(1000);
80 }
81 }
78 }
82
79
83 int abstractSpwManager::getRMAPtransactionID()
80 int abstractSpwManager::getRMAPtransactionID()
@@ -74,7 +74,7 class abstractSpwManager: public QThread
74 public:
74 public:
75 explicit abstractSpwManager(socexplorerplugin *plugin = 0,QObject* parent=0);
75 explicit abstractSpwManager(socexplorerplugin *plugin = 0,QObject* parent=0);
76 ~abstractSpwManager();
76 ~abstractSpwManager();
77 virtual void run(){}
77 virtual void run(){};
78 virtual bool connectBridge()=0;
78 virtual bool connectBridge()=0;
79 virtual bool disconnectBridge()=0;
79 virtual bool disconnectBridge()=0;
80 int getRMAPtransactionID();
80 int getRMAPtransactionID();
@@ -31,7 +31,7 spwplugin::spwplugin(QWidget *parent):so
31 {
31 {
32 Q_UNUSED(parent)
32 Q_UNUSED(parent)
33 FakeStarDundeeSpwUSB_Lib::resolve();
33 FakeStarDundeeSpwUSB_Lib::resolve();
34 this->bridge = NULL;
34 this->bridge = Q_NULLPTR;
35 this->scanDone = false;
35 this->scanDone = false;
36 // this->pyObject = new spwPyWrapper(this);
36 // this->pyObject = new spwPyWrapper(this);
37 this->tcpServer = new SpwTcpPacketServer(this);
37 this->tcpServer = new SpwTcpPacketServer(this);
@@ -58,7 +58,8 spwplugin::spwplugin(QWidget *parent):so
58
58
59 spwplugin::~spwplugin()
59 spwplugin::~spwplugin()
60 {
60 {
61
61 if(this->bridge!=Q_NULLPTR)
62 delete this->bridge;
62 }
63 }
63
64
64
65
General Comments 0
You need to be logged in to leave comments. Login now