mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
Check passed pid. Prevents invalid use and possible corruption
of the 'state'. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1394 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -57,6 +57,12 @@ int tuxtxt_stop()
|
|||||||
|
|
||||||
void tuxtxt_start(int tpid, int source)
|
void tuxtxt_start(int tpid, int source)
|
||||||
{
|
{
|
||||||
|
if (tpid == -1)
|
||||||
|
{
|
||||||
|
printf("tuxtxt: invalid PID!\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (tuxtxt_cache.vtxtpid != tpid)
|
if (tuxtxt_cache.vtxtpid != tpid)
|
||||||
{
|
{
|
||||||
tuxtxt_stop();
|
tuxtxt_stop();
|
||||||
@@ -79,7 +85,7 @@ void tuxtxt_close()
|
|||||||
tuxtxt_stop();
|
tuxtxt_stop();
|
||||||
#if 0
|
#if 0
|
||||||
if (tuxtxt_cache.dmx != -1)
|
if (tuxtxt_cache.dmx != -1)
|
||||||
close(tuxtxt_cache.dmx);
|
close(tuxtxt_cache.dmx);
|
||||||
#endif
|
#endif
|
||||||
tuxtxt_cache.dmx = -1;
|
tuxtxt_cache.dmx = -1;
|
||||||
tuxtxt_clear_cache();
|
tuxtxt_clear_cache();
|
||||||
|
Reference in New Issue
Block a user