PIBroadcast fix
This commit is contained in:
@@ -58,7 +58,7 @@ PIBroadcast::PIBroadcast(bool send_only): PIThread(), PIEthUtilBase() {
|
|||||||
|
|
||||||
PIBroadcast::~PIBroadcast() {
|
PIBroadcast::~PIBroadcast() {
|
||||||
PIThread::stopAndWait();
|
PIThread::stopAndWait();
|
||||||
mcast_mutex.unlock();
|
// mcast_mutex.unlock();
|
||||||
destroyAll();
|
destroyAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,10 +202,10 @@ void PIBroadcast::initAll(PIVector<PINetworkAddress> al) {
|
|||||||
|
|
||||||
|
|
||||||
void PIBroadcast::send(const PIByteArray & data) {
|
void PIBroadcast::send(const PIByteArray & data) {
|
||||||
if (!isRunning()) {
|
/*if (!isRunning()) {
|
||||||
reinit();
|
reinit();
|
||||||
PIThread::start(3000);
|
PIThread::start(3000);
|
||||||
}
|
}*/
|
||||||
PIByteArray cd = cryptData(data);
|
PIByteArray cd = cryptData(data);
|
||||||
if (cd.isEmpty()) return;
|
if (cd.isEmpty()) return;
|
||||||
PIMutexLocker ml(mcast_mutex);
|
PIMutexLocker ml(mcast_mutex);
|
||||||
|
|||||||
@@ -635,6 +635,7 @@ bool PIThread::startOnce() {
|
|||||||
|
|
||||||
|
|
||||||
void PIThread::terminate() {
|
void PIThread::terminate() {
|
||||||
|
piCoutObj << "Warning, terminate!";
|
||||||
// PICout(PICoutManipulators::DefaultControls) << "thread" << this << "terminate ..." << running_;
|
// PICout(PICoutManipulators::DefaultControls) << "thread" << this << "terminate ..." << running_;
|
||||||
#ifdef FREERTOS
|
#ifdef FREERTOS
|
||||||
PICout(PICoutManipulators::DefaultControls) << "FreeRTOS can't terminate pthreads! waiting for stop";
|
PICout(PICoutManipulators::DefaultControls) << "FreeRTOS can't terminate pthreads! waiting for stop";
|
||||||
|
|||||||
Reference in New Issue
Block a user