mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed the cTimer::operator=() so that it won't mess up the cListObject's pointers; fixed a memory leak in the cTimer::operator=() when using the 'aux' string
This commit is contained in:
parent
4ae577fcb4
commit
4c88f1da7e
@ -1737,6 +1737,8 @@ Alexander Rieger <Alexander.Rieger@inka.de>
|
|||||||
for fixing a typo in skins.h
|
for fixing a typo in skins.h
|
||||||
for making cSkins::QueueMessage() called from a background thread with an empty
|
for making cSkins::QueueMessage() called from a background thread with an empty
|
||||||
message clears all messages that have been previously queued by that thread
|
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
|
||||||
|
|
||||||
Philip Prindeville <philipp_subx@redfish-solutions.com>
|
Philip Prindeville <philipp_subx@redfish-solutions.com>
|
||||||
for updates to 'sources.conf'
|
for updates to 'sources.conf'
|
||||||
|
6
HISTORY
6
HISTORY
@ -4896,6 +4896,10 @@ Video Disk Recorder Revision History
|
|||||||
detatching receivers. This change has caused some unwanted behavior, so further
|
detatching receivers. This change has caused some unwanted behavior, so further
|
||||||
testing is necessary.
|
testing is necessary.
|
||||||
|
|
||||||
2006-09-01: Version 1.4.2-1
|
2006-09-02: Version 1.4.2-1
|
||||||
|
|
||||||
- Added LC_ALL to the checks for UTF-8 at startup (suggested by Matthias Schwarzott).
|
- Added LC_ALL to the checks for UTF-8 at startup (suggested by Matthias Schwarzott).
|
||||||
|
- Fixed the cTimer::operator=() so that it won't mess up the cListObject's pointers
|
||||||
|
(reported by Alexander Rieger).
|
||||||
|
- Fixed a memory leak in the cTimer::operator=() when using the 'aux' string
|
||||||
|
(reported by Alexander Rieger).
|
||||||
|
23
timers.c
23
timers.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: timers.c 1.62 2006/08/05 12:03:36 kls Exp $
|
* $Id: timers.c 1.63 2006/09/02 10:20:36 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "timers.h"
|
#include "timers.h"
|
||||||
@ -90,11 +90,24 @@ cTimer::~cTimer()
|
|||||||
|
|
||||||
cTimer& cTimer::operator= (const cTimer &Timer)
|
cTimer& cTimer::operator= (const cTimer &Timer)
|
||||||
{
|
{
|
||||||
memcpy(this, &Timer, sizeof(*this));
|
startTime = Timer.startTime;
|
||||||
if (aux)
|
stopTime = Timer.stopTime;
|
||||||
aux = strdup(aux);
|
|
||||||
event = NULL;
|
|
||||||
lastSetEvent = 0;
|
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;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user