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:
parent
f7369c9578
commit
fb126677f1
3
device.c
3
device.c
@ -46,12 +46,13 @@ cIptvDevice::cIptvDevice(unsigned int indexP)
|
||||
// Check if dvr fifo exists
|
||||
struct stat sb;
|
||||
cString filename = cString::sprintf(IPTV_DVR_FILENAME, deviceIndexM);
|
||||
stat(filename, &sb);
|
||||
if(stat(filename, &sb) == 0) {
|
||||
if (S_ISFIFO(sb.st_mode)) {
|
||||
dvrFdM = open(filename, O_RDWR | O_NONBLOCK);
|
||||
if (dvrFdM >= 0)
|
||||
info("IPTV device %d redirecting input stream to '%s'", deviceIndexM, *filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cIptvDevice::~cIptvDevice()
|
||||
|
Loading…
Reference in New Issue
Block a user