mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
scanait: another ait segfault fix
Origin commit data
------------------
Branch: ni/coolstream
Commit: 48a03894d1
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2021-10-27 (Wed, 27 Oct 2021)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -44,6 +44,7 @@ class CAit : public OpenThreads::Thread
|
|||||||
private:
|
private:
|
||||||
int dmxnum;
|
int dmxnum;
|
||||||
unsigned short pid;
|
unsigned short pid;
|
||||||
|
bool running;
|
||||||
std::string name;
|
std::string name;
|
||||||
ApplicationInformationSectionList sections;
|
ApplicationInformationSectionList sections;
|
||||||
void run();
|
void run();
|
||||||
|
@@ -41,6 +41,7 @@ CAit::CAit()
|
|||||||
{
|
{
|
||||||
dmxnum = 0;
|
dmxnum = 0;
|
||||||
pid = 0;
|
pid = 0;
|
||||||
|
running = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAit::setDemux(int dnum)
|
void CAit::setDemux(int dnum)
|
||||||
@@ -50,17 +51,22 @@ void CAit::setDemux(int dnum)
|
|||||||
|
|
||||||
bool CAit::Start()
|
bool CAit::Start()
|
||||||
{
|
{
|
||||||
|
if (running)
|
||||||
|
return false;
|
||||||
|
running = true;
|
||||||
|
|
||||||
int ret = start();
|
int ret = start();
|
||||||
return (ret == 0);
|
return (ret == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CAit::Stop()
|
bool CAit::Stop()
|
||||||
{
|
{
|
||||||
if(pid > 0){
|
if (!running)
|
||||||
|
return false;
|
||||||
|
running = false;
|
||||||
|
|
||||||
int ret = join();
|
int ret = join();
|
||||||
return (ret == 0);
|
return (ret == 0);
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAit::run()
|
void CAit::run()
|
||||||
|
Reference in New Issue
Block a user