summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-08-16 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-08-16 18:00:00 +0200
commited643353b100bee75459c4ef2d0330e7a04e1f2a (patch)
tree8a424eba464677a71309e1125ce4e7acef58607e /vdr.c
parent527748826c8d3cfacff8a7ab3fda9551c1182590 (diff)
downloadvdr-patch-lnbsharing-ed643353b100bee75459c4ef2d0330e7a04e1f2a.tar.gz
vdr-patch-lnbsharing-ed643353b100bee75459c4ef2d0330e7a04e1f2a.tar.bz2
Version 1.1.7vdr-1.1.7
- Adapted VDR to the NEWSTRUCT driver. To use the new driver, compile VDR with 'make NEWSTRUCT=1' (thanks to Holger Wächtler for some valuable advice). By default it currently still uses the old driver. - Added some missing #includes (thanks to Martin Hammerschmid). - Changed the log error message "can't record MPEG1!" to "error in data stream!", since the mentioning of MPEG1 has irritated many people. - Consistently using malloc/free and new/delete (thanks to Andreas Schultz). - Temporarily made cDevice::ProvidesCa() virtual (Andreas Schultz needs this in his DXR3 plugin). - cDevice no longer exposes a file handle to cPlayer. A derived cPlayer class can now call DevicePoll() to see whether the replay device is ready for further data. A derived cDevice class must implement Poll() and shall check if any of its file handles is ready for data. - Implemented several replay modes to allow players that play only audio (thanks to Stefan Huelswitt). - Improved cCondVar::Wait() and implemented cCondVar::TimedWait() (thanks to Stefan Huelswitt). - VDR no longer gives up if there is no DVB device. It continues to work if there is at least one device, either a DVB device found by the core VDR code itself, or a device implemented by a plugin.
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/vdr.c b/vdr.c
index fa7429c..9da5b5e 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/people/kls/vdr
*
- * $Id: vdr.c 1.118 2002/08/04 09:56:30 kls Exp $
+ * $Id: vdr.c 1.120 2002/08/16 09:54:03 kls Exp $
*/
#include <getopt.h>
@@ -327,8 +327,7 @@ int main(int argc, char *argv[])
// DVB interfaces:
- if (!cDvbDevice::Initialize())
- return 2;
+ cDvbDevice::Initialize();
cSIProcessor::Read();
@@ -340,6 +339,12 @@ int main(int argc, char *argv[])
// Primary device:
cDevice::SetPrimaryDevice(Setup.PrimaryDVB);
+ if (!cDevice::PrimaryDevice()) {
+ const char *msg = "no primary device found - giving up!";
+ fprintf(stderr, "vdr: %s\n", msg);
+ esyslog("ERROR: %s", msg);
+ return 2;
+ }
// OSD:
@@ -585,7 +590,7 @@ int main(int argc, char *argv[])
asprintf(&buf, tr("Recording in %d minutes, shut down anyway?"), Delta / 60);
if (Interface->Confirm(buf))
ForceShutdown = true;
- delete buf;
+ free(buf);
}
if (!Next || Delta > Setup.MinEventTimeout * 60 || ForceShutdown) {
ForceShutdown = false;
@@ -600,7 +605,7 @@ int main(int argc, char *argv[])
asprintf(&cmd, "%s %ld %ld %d \"%s\" %d", Shutdown, Next, Delta, Channel, strescape(File, "\"$"), UserShutdown);
isyslog("executing '%s'", cmd);
SystemExec(cmd);
- delete cmd;
+ free(cmd);
}
else if (WatchdogTimeout > 0) {
alarm(WatchdogTimeout);