summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2006-09-09 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2006-09-09 18:00:00 +0200
commit0b99b3aac10e38d624488978641d66fae3f41a28 (patch)
treef178a06e8f4436fc2bc203777b7eb65ba508cedb
parentc49ca5abb73cbc11447da5d961e106025dc927d0 (diff)
downloadvdr-patch-lnbsharing-0b99b3aac10e38d624488978641d66fae3f41a28.tar.gz
vdr-patch-lnbsharing-0b99b3aac10e38d624488978641d66fae3f41a28.tar.bz2
Version 1.4.2-2vdr-1.4.2-2
- Fixed cTimer::operator=() in case a cTimer variable is assigned to itself (thanks to Alexander Rieger). - Implemented a copy constructor for cTimer (thanks to Udo Richter for reporting that an assignment in svdrp.c didn't use the cTimer::operator=()).
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY7
-rw-r--r--config.h8
-rw-r--r--timers.c48
-rw-r--r--timers.h3
5 files changed, 44 insertions, 24 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 2315e54..7841368 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1465,6 +1465,7 @@ Udo Richter <udo_richter@gmx.de>
for fixing getting the next active timer when shutting down
for reporting a problem with cPlugin::ConfigDirectory() in case a plugin calls it
from a separate thread
+ for reporting that an assignment in svdrp.c didn't use the cTimer::operator=())
Sven Kreiensen <svenk@kammer.uni-hannover.de>
for his help in keeping 'channels.conf.terr' up to date
@@ -1741,6 +1742,7 @@ Alexander Rieger <Alexander.Rieger@inka.de>
message clears all messages that have been previously queued by that thread
for reporting that the cTimer::operator=() messes up the cListObject's pointers
for reporting a memory leak in the cTimer::operator=() when using the 'aux' string
+ for fixing cTimer::operator=() in case a cTimer variable is assigned to itself
Philip Prindeville <philipp_subx@redfish-solutions.com>
for updates to 'sources.conf'
diff --git a/HISTORY b/HISTORY
index 9fcbe45..1e4a553 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4907,3 +4907,10 @@ Video Disk Recorder Revision History
Martin Ostermann).
- Fixed handling relative volume settings that unmute the audio in the call to
cStatus::MsgSetVolume() (reported by Oliver Endriss).
+
+2006-09-09: Version 1.4.2-2
+
+- Fixed cTimer::operator=() in case a cTimer variable is assigned to itself (thanks
+ to Alexander Rieger).
+- Implemented a copy constructor for cTimer (thanks to Udo Richter for reporting that
+ an assignment in svdrp.c didn't use the cTimer::operator=()).
diff --git a/config.h b/config.h
index d1d4e2e..8e3ec8d 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h 1.268 2006/09/01 12:59:35 kls Exp $
+ * $Id: config.h 1.269 2006/09/04 17:44:12 kls Exp $
*/
#ifndef __CONFIG_H
@@ -21,13 +21,13 @@
// VDR's own version number:
-#define VDRVERSION "1.4.2-1"
+#define VDRVERSION "1.4.2-2"
#define VDRVERSNUM 10402 // Version * 10000 + Major * 100 + Minor
// The plugin API's version number:
-#define APIVERSION "1.4.2"
-#define APIVERSNUM 10402 // Version * 10000 + Major * 100 + Minor
+#define APIVERSION "1.4.3"
+#define APIVERSNUM 10403 // Version * 10000 + Major * 100 + Minor
// When loading plugins, VDR searches them by their APIVERSION, which
// may be smaller than VDRVERSION in case there have been no changes to
diff --git a/timers.c b/timers.c
index d8d0016..18dab0f 100644
--- a/timers.c
+++ b/timers.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: timers.c 1.63 2006/09/02 10:20:36 kls Exp $
+ * $Id: timers.c 1.64 2006/09/08 15:06:09 kls Exp $
*/
#include "timers.h"
@@ -83,6 +83,14 @@ cTimer::cTimer(const cEvent *Event)
event = NULL; // let SetEvent() be called to get a log message
}
+cTimer::cTimer(const cTimer &Timer)
+{
+ channel = NULL;
+ aux = NULL;
+ event = NULL;
+ *this = Timer;
+}
+
cTimer::~cTimer()
{
free(aux);
@@ -90,24 +98,26 @@ cTimer::~cTimer()
cTimer& cTimer::operator= (const cTimer &Timer)
{
- startTime = Timer.startTime;
- stopTime = Timer.stopTime;
- lastSetEvent = 0;
- recording = Timer.recording;
- pending = Timer.pending;
- inVpsMargin = Timer.inVpsMargin;
- flags = Timer.flags;
- channel = Timer.channel;
- day = Timer.day;
- weekdays = Timer.weekdays;
- start = Timer.start;
- stop = Timer.stop;
- priority = Timer.priority;
- lifetime = Timer.lifetime;
- strncpy(file, Timer.file, sizeof(file));
- free(aux);
- aux = Timer.aux ? strdup(Timer.aux) : NULL;
- event = NULL;
+ if (&Timer != this) {
+ startTime = Timer.startTime;
+ stopTime = Timer.stopTime;
+ lastSetEvent = 0;
+ recording = Timer.recording;
+ pending = Timer.pending;
+ inVpsMargin = Timer.inVpsMargin;
+ flags = Timer.flags;
+ channel = Timer.channel;
+ day = Timer.day;
+ weekdays = Timer.weekdays;
+ start = Timer.start;
+ stop = Timer.stop;
+ priority = Timer.priority;
+ lifetime = Timer.lifetime;
+ strncpy(file, Timer.file, sizeof(file));
+ free(aux);
+ aux = Timer.aux ? strdup(Timer.aux) : NULL;
+ event = NULL;
+ }
return *this;
}
diff --git a/timers.h b/timers.h
index 8abc523..e3d5450 100644
--- a/timers.h
+++ b/timers.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: timers.h 1.28 2006/04/08 12:41:44 kls Exp $
+ * $Id: timers.h 1.29 2006/09/04 17:07:39 kls Exp $
*/
#ifndef __TIMERS_H
@@ -44,6 +44,7 @@ private:
public:
cTimer(bool Instant = false, bool Pause = false, cChannel *Channel = NULL);
cTimer(const cEvent *Event);
+ cTimer(const cTimer &Timer);
virtual ~cTimer();
cTimer& operator= (const cTimer &Timer);
virtual int Compare(const cListObject &ListObject) const;