1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00

iptv: device: fix stat() call

This commit is contained in:
repojohnray 2020-05-18 16:59:14 +02:00 committed by repojohnray
parent f7369c9578
commit fb126677f1
No known key found for this signature in database
GPG Key ID: 45E288320CD945F1

View File

@ -46,13 +46,14 @@ cIptvDevice::cIptvDevice(unsigned int indexP)
// Check if dvr fifo exists // Check if dvr fifo exists
struct stat sb; struct stat sb;
cString filename = cString::sprintf(IPTV_DVR_FILENAME, deviceIndexM); cString filename = cString::sprintf(IPTV_DVR_FILENAME, deviceIndexM);
stat(filename, &sb); if(stat(filename, &sb) == 0) {
if (S_ISFIFO(sb.st_mode)) { if (S_ISFIFO(sb.st_mode)) {
dvrFdM = open(filename, O_RDWR | O_NONBLOCK); dvrFdM = open(filename, O_RDWR | O_NONBLOCK);
if (dvrFdM >= 0) if (dvrFdM >= 0)
info("IPTV device %d redirecting input stream to '%s'", deviceIndexM, *filename); info("IPTV device %d redirecting input stream to '%s'", deviceIndexM, *filename);
} }
} }
}
cIptvDevice::~cIptvDevice() cIptvDevice::~cIptvDevice()
{ {