The ivtv device open() call is not checked to see if it worked. If it
From: Erik Hovland <erik@hovland.org>
didn't we could be passing -1 to either close or read. Both
bad ideas.
---
libs/libmythtv/mpegrecorder.cpp | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/libs/libmythtv/mpegrecorder.cpp b/libs/libmythtv/mpegrecorder.cpp
index 43675db..2746400 100644
a
|
b
|
void MpegRecorder::StartRecording(void) |
852 | 852 | if (readfd < 0) |
853 | 853 | readfd = open(videodevice.ascii(), O_RDWR); |
854 | 854 | |
| 855 | if (readfd == -1) |
| 856 | { |
| 857 | VERBOSE(VB_IMPORTANT, |
| 858 | LOC_ERR + QString("Open error on device %1") |
| 859 | .arg(videodevice.ascii())); |
| 860 | continue; |
| 861 | } |
| 862 | |
855 | 863 | tv.tv_sec = 5; |
856 | 864 | tv.tv_usec = 0; |
857 | 865 | FD_ZERO(&rdset); |