Log messages about switching channels now include the channel ID

This commit is contained in:
Klaus Schmidinger 2017-05-01 13:06:32 +02:00
parent 9491948f04
commit 84b8ea8395
5 changed files with 9 additions and 6 deletions

View File

@ -3389,6 +3389,7 @@ Dietmar Spingler <d_spingler@gmx.de>
for suggesting to implement the setup option "Recording/Record key handling"
for suggesting to cache the channel/CAM relations in the file 'cam.data'
for suggesting to optionally list the channels with channel ids in the SVDRP command LSTC
for suggesting to include the channel ID in log messages about switching channels
Stefan Schallenberg <infos@nafets.de>
for adding the functions IndexOf(), InsertUnique(), AppendUnique() and RemoveElement()

View File

@ -8997,3 +8997,5 @@ Video Disk Recorder Revision History
the current SID, in order to avoid any parental rating dialogs.
- Fixed handling UNC values (the shift operator behaves unexpected for shift values
larger than the size of the variable).
- Log messages about switching channels now include the channel ID (suggested by
Dietmar Spingler).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: device.c 4.16 2017/05/01 09:24:49 kls Exp $
* $Id: device.c 4.17 2017/05/01 13:00:57 kls Exp $
*/
#include "device.h"
@ -782,7 +782,7 @@ bool cDevice::MaySwitchTransponder(const cChannel *Channel) const
bool cDevice::SwitchChannel(const cChannel *Channel, bool LiveView)
{
if (LiveView) {
isyslog("switching to channel %d (%s)", Channel->Number(), Channel->Name());
isyslog("switching to channel %d %s (%s)", Channel->Number(), *Channel->GetChannelID().ToString(), Channel->Name());
cControl::Shutdown(); // prevents old channel from being shown too long if GetDevice() takes longer
}
for (int i = 3; i--;) {

4
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menu.c 4.25 2017/04/20 09:15:49 kls Exp $
* $Id: menu.c 4.26 2017/05/01 13:01:00 kls Exp $
*/
#include "menu.h"
@ -5185,7 +5185,7 @@ bool cRecordControls::Start(cTimers *Timers, cTimer *Timer, bool Pause)
int Priority = Timer ? Timer->Priority() : Pause ? Setup.PausePriority : Setup.DefaultPriority;
cDevice *device = cDevice::GetDevice(Channel, Priority, false);
if (device) {
dsyslog("switching device %d to channel %d (%s)", device->DeviceNumber() + 1, Channel->Number(), Channel->Name());
dsyslog("switching device %d to channel %d %s (%s)", device->DeviceNumber() + 1, Channel->Number(), *Channel->GetChannelID().ToString(), Channel->Name());
if (!device->SwitchChannel(Channel, false)) {
ShutdownHandler.RequestEmergencyExit();
return false;

4
vdr.c
View File

@ -22,7 +22,7 @@
*
* The project's page is at http://www.tvdr.de
*
* $Id: vdr.c 4.12 2017/04/03 12:35:37 kls Exp $
* $Id: vdr.c 4.13 2017/05/01 13:00:51 kls Exp $
*/
#include <getopt.h>
@ -1151,7 +1151,7 @@ int main(int argc, char *argv[])
if (!Device->IsTunedToTransponder(Timer->Channel())) {
if (Device == cDevice::ActualDevice() && !Device->IsPrimaryDevice())
cDevice::PrimaryDevice()->StopReplay(); // stop transfer mode
dsyslog("switching device %d to channel %d (%s)", Device->DeviceNumber() + 1, Timer->Channel()->Number(), Timer->Channel()->Name());
dsyslog("switching device %d to channel %d %s (%s)", Device->DeviceNumber() + 1, Timer->Channel()->Number(), *Timer->Channel()->GetChannelID().ToString(), Timer->Channel()->Name());
if (Device->SwitchChannel(Timer->Channel(), false))
Device->SetOccupied(TIMERDEVICETIMEOUT);
}