mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Added the channel name to log messages that reference a channel
This commit is contained in:
parent
1ddda558b0
commit
555fe68a01
@ -3302,6 +3302,7 @@ Dietmar Spingler <d_spingler@gmx.de>
|
|||||||
a CAM needs to receive the TS
|
a CAM needs to receive the TS
|
||||||
for reporting a problem that led to a fix with EMM pids not being properly reset for
|
for reporting a problem that led to a fix with EMM pids not being properly reset for
|
||||||
CAMs that need to receive the TS
|
CAMs that need to receive the TS
|
||||||
|
for suggesting to add the channel name to log messages that reference a channel
|
||||||
|
|
||||||
Stefan Schallenberg <infos@nafets.de>
|
Stefan Schallenberg <infos@nafets.de>
|
||||||
for adding the functions IndexOf(), InsertUnique(), AppendUnique() and RemoveElement()
|
for adding the functions IndexOf(), InsertUnique(), AppendUnique() and RemoveElement()
|
||||||
|
2
HISTORY
2
HISTORY
@ -8369,3 +8369,5 @@ Video Disk Recorder Revision History
|
|||||||
(like device or frontend numbers) is within the first 15 characters of the
|
(like device or frontend numbers) is within the first 15 characters of the
|
||||||
string, because only these are displayed in thread listings. Plugin authors may
|
string, because only these are displayed in thread listings. Plugin authors may
|
||||||
want to do the same.
|
want to do the same.
|
||||||
|
- Added the channel name to log messages that reference a channel (suggested by
|
||||||
|
Dietmar Spingler).
|
||||||
|
16
channels.c
16
channels.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: channels.c 3.6 2015/01/04 15:02:21 kls Exp $
|
* $Id: channels.c 3.7 2015/01/14 12:15:03 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "channels.h"
|
#include "channels.h"
|
||||||
@ -221,7 +221,7 @@ bool cChannel::SetTransponderData(int Source, int Frequency, int Srate, const ch
|
|||||||
nameSource = NULL;
|
nameSource = NULL;
|
||||||
shortNameSource = NULL;
|
shortNameSource = NULL;
|
||||||
if (Number() && !Quiet) {
|
if (Number() && !Quiet) {
|
||||||
dsyslog("changing transponder data of channel %d from %s to %s", Number(), *OldTransponderData, *TransponderDataToString());
|
dsyslog("changing transponder data of channel %d (%s) from %s to %s", Number(), name, *OldTransponderData, *TransponderDataToString());
|
||||||
modification |= CHANNELMOD_TRANSP;
|
modification |= CHANNELMOD_TRANSP;
|
||||||
Channels.SetModified();
|
Channels.SetModified();
|
||||||
}
|
}
|
||||||
@ -233,7 +233,7 @@ void cChannel::SetId(int Nid, int Tid, int Sid, int Rid)
|
|||||||
{
|
{
|
||||||
if (nid != Nid || tid != Tid || sid != Sid || rid != Rid) {
|
if (nid != Nid || tid != Tid || sid != Sid || rid != Rid) {
|
||||||
if (Number()) {
|
if (Number()) {
|
||||||
dsyslog("changing id of channel %d from %d-%d-%d-%d to %d-%d-%d-%d", Number(), nid, tid, sid, rid, Nid, Tid, Sid, Rid);
|
dsyslog("changing id of channel %d (%s) from %d-%d-%d-%d to %d-%d-%d-%d", Number(), name, nid, tid, sid, rid, Nid, Tid, Sid, Rid);
|
||||||
modification |= CHANNELMOD_ID;
|
modification |= CHANNELMOD_ID;
|
||||||
Channels.SetModified();
|
Channels.SetModified();
|
||||||
Channels.UnhashChannel(this);
|
Channels.UnhashChannel(this);
|
||||||
@ -278,7 +278,7 @@ void cChannel::SetPortalName(const char *PortalName)
|
|||||||
{
|
{
|
||||||
if (!isempty(PortalName) && strcmp(portalName, PortalName) != 0) {
|
if (!isempty(PortalName) && strcmp(portalName, PortalName) != 0) {
|
||||||
if (Number()) {
|
if (Number()) {
|
||||||
dsyslog("changing portal name of channel %d from '%s' to '%s'", Number(), portalName, PortalName);
|
dsyslog("changing portal name of channel %d (%s) from '%s' to '%s'", Number(), name, portalName, PortalName);
|
||||||
modification |= CHANNELMOD_NAME;
|
modification |= CHANNELMOD_NAME;
|
||||||
Channels.SetModified();
|
Channels.SetModified();
|
||||||
}
|
}
|
||||||
@ -368,7 +368,7 @@ void cChannel::SetPids(int Vpid, int Ppid, int Vtype, int *Apids, int *Atypes, c
|
|||||||
q += IntArrayToString(q, Spids, 10, SLangs);
|
q += IntArrayToString(q, Spids, 10, SLangs);
|
||||||
*q = 0;
|
*q = 0;
|
||||||
if (Number())
|
if (Number())
|
||||||
dsyslog("changing pids of channel %d from %d+%d=%d:%s:%s:%d to %d+%d=%d:%s:%s:%d", Number(), vpid, ppid, vtype, OldApidsBuf, OldSpidsBuf, tpid, Vpid, Ppid, Vtype, NewApidsBuf, NewSpidsBuf, Tpid);
|
dsyslog("changing pids of channel %d (%s) from %d+%d=%d:%s:%s:%d to %d+%d=%d:%s:%s:%d", Number(), name, vpid, ppid, vtype, OldApidsBuf, OldSpidsBuf, tpid, Vpid, Ppid, Vtype, NewApidsBuf, NewSpidsBuf, Tpid);
|
||||||
vpid = Vpid;
|
vpid = Vpid;
|
||||||
ppid = Ppid;
|
ppid = Ppid;
|
||||||
vtype = Vtype;
|
vtype = Vtype;
|
||||||
@ -427,7 +427,7 @@ void cChannel::SetCaIds(const int *CaIds)
|
|||||||
IntArrayToString(OldCaIdsBuf, caids, 16);
|
IntArrayToString(OldCaIdsBuf, caids, 16);
|
||||||
IntArrayToString(NewCaIdsBuf, CaIds, 16);
|
IntArrayToString(NewCaIdsBuf, CaIds, 16);
|
||||||
if (Number())
|
if (Number())
|
||||||
dsyslog("changing caids of channel %d from %s to %s", Number(), OldCaIdsBuf, NewCaIdsBuf);
|
dsyslog("changing caids of channel %d (%s) from %s to %s", Number(), name, OldCaIdsBuf, NewCaIdsBuf);
|
||||||
for (int i = 0; i <= MAXCAIDS; i++) { // <= to copy the terminating 0
|
for (int i = 0; i <= MAXCAIDS; i++) { // <= to copy the terminating 0
|
||||||
caids[i] = CaIds[i];
|
caids[i] = CaIds[i];
|
||||||
if (!CaIds[i])
|
if (!CaIds[i])
|
||||||
@ -444,7 +444,7 @@ void cChannel::SetCaDescriptors(int Level)
|
|||||||
modification |= CHANNELMOD_CA;
|
modification |= CHANNELMOD_CA;
|
||||||
Channels.SetModified();
|
Channels.SetModified();
|
||||||
if (Number() && Level > 1)
|
if (Number() && Level > 1)
|
||||||
dsyslog("changing ca descriptors of channel %d", Number());
|
dsyslog("changing ca descriptors of channel %d (%s)", Number(), name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -470,7 +470,7 @@ void cChannel::SetLinkChannels(cLinkChannels *LinkChannels)
|
|||||||
}
|
}
|
||||||
char buffer[((linkChannels ? linkChannels->Count() : 0) + (LinkChannels ? LinkChannels->Count() : 0)) * 6 + 256]; // 6: 5 digit channel number plus blank, 256: other texts (see below) plus reserve
|
char buffer[((linkChannels ? linkChannels->Count() : 0) + (LinkChannels ? LinkChannels->Count() : 0)) * 6 + 256]; // 6: 5 digit channel number plus blank, 256: other texts (see below) plus reserve
|
||||||
char *q = buffer;
|
char *q = buffer;
|
||||||
q += sprintf(q, "linking channel %d from", Number());
|
q += sprintf(q, "linking channel %d (%s) from", Number(), name);
|
||||||
if (linkChannels) {
|
if (linkChannels) {
|
||||||
for (cLinkChannel *lc = linkChannels->First(); lc; lc = linkChannels->Next(lc)) {
|
for (cLinkChannel *lc = linkChannels->First(); lc; lc = linkChannels->Next(lc)) {
|
||||||
lc->Channel()->SetRefChannel(NULL);
|
lc->Channel()->SetRefChannel(NULL);
|
||||||
|
4
device.c
4
device.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: device.c 3.18 2015/01/14 11:06:13 kls Exp $
|
* $Id: device.c 3.19 2015/01/14 12:02:44 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
@ -696,7 +696,7 @@ bool cDevice::MaySwitchTransponder(const cChannel *Channel) const
|
|||||||
bool cDevice::SwitchChannel(const cChannel *Channel, bool LiveView)
|
bool cDevice::SwitchChannel(const cChannel *Channel, bool LiveView)
|
||||||
{
|
{
|
||||||
if (LiveView) {
|
if (LiveView) {
|
||||||
isyslog("switching to channel %d", Channel->Number());
|
isyslog("switching to channel %d (%s)", Channel->Number(), Channel->Name());
|
||||||
cControl::Shutdown(); // prevents old channel from being shown too long if GetDevice() takes longer
|
cControl::Shutdown(); // prevents old channel from being shown too long if GetDevice() takes longer
|
||||||
}
|
}
|
||||||
for (int i = 3; i--;) {
|
for (int i = 3; i--;) {
|
||||||
|
12
dvbdevice.c
12
dvbdevice.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: dvbdevice.c 3.13 2015/01/14 11:06:42 kls Exp $
|
* $Id: dvbdevice.c 3.14 2015/01/14 12:09:19 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbdevice.h"
|
#include "dvbdevice.h"
|
||||||
@ -771,7 +771,7 @@ static int GetRequiredDeliverySystem(const cChannel *Channel, const cDvbTranspon
|
|||||||
else if (Channel->IsTerr())
|
else if (Channel->IsTerr())
|
||||||
ds = Dtp->System() == DVB_SYSTEM_1 ? SYS_DVBT : SYS_DVBT2;
|
ds = Dtp->System() == DVB_SYSTEM_1 ? SYS_DVBT : SYS_DVBT2;
|
||||||
else
|
else
|
||||||
esyslog("ERROR: can't determine frontend type for channel %d", Channel->Number());
|
esyslog("ERROR: can't determine frontend type for channel %d (%s)", Channel->Number(), Channel->Name());
|
||||||
return ds;
|
return ds;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -823,7 +823,7 @@ bool cDvbTuner::SetFrontend(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
esyslog("ERROR: no DiSEqC parameters found for channel %d", channel.Number());
|
esyslog("ERROR: no DiSEqC parameters found for channel %d (%s)", channel.Number(), channel.Name());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -961,7 +961,7 @@ void cDvbTuner::Action(void)
|
|||||||
lastDiseqc = NULL;
|
lastDiseqc = NULL;
|
||||||
lastSource = 0;
|
lastSource = 0;
|
||||||
if (time(NULL) - lastTimeoutReport > 60) { // let's not get too many of these
|
if (time(NULL) - lastTimeoutReport > 60) { // let's not get too many of these
|
||||||
isyslog("frontend %d/%d timed out while tuning to channel %d, tp %d", adapter, frontend, channel.Number(), channel.Transponder());
|
isyslog("frontend %d/%d timed out while tuning to channel %d (%s), tp %d", adapter, frontend, channel.Number(), channel.Name(), channel.Transponder());
|
||||||
lastTimeoutReport = time(NULL);
|
lastTimeoutReport = time(NULL);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@ -979,7 +979,7 @@ void cDvbTuner::Action(void)
|
|||||||
}
|
}
|
||||||
else if (Status & FE_HAS_LOCK) {
|
else if (Status & FE_HAS_LOCK) {
|
||||||
if (LostLock) {
|
if (LostLock) {
|
||||||
isyslog("frontend %d/%d regained lock on channel %d, tp %d", adapter, frontend, channel.Number(), channel.Transponder());
|
isyslog("frontend %d/%d regained lock on channel %d (%s), tp %d", adapter, frontend, channel.Number(), channel.Name(), channel.Transponder());
|
||||||
LostLock = false;
|
LostLock = false;
|
||||||
}
|
}
|
||||||
tunerStatus = tsLocked;
|
tunerStatus = tsLocked;
|
||||||
@ -988,7 +988,7 @@ void cDvbTuner::Action(void)
|
|||||||
}
|
}
|
||||||
else if (tunerStatus == tsLocked) {
|
else if (tunerStatus == tsLocked) {
|
||||||
LostLock = true;
|
LostLock = true;
|
||||||
isyslog("frontend %d/%d lost lock on channel %d, tp %d", adapter, frontend, channel.Number(), channel.Transponder());
|
isyslog("frontend %d/%d lost lock on channel %d (%s), tp %d", adapter, frontend, channel.Number(), channel.Name(), channel.Transponder());
|
||||||
tunerStatus = tsTuned;
|
tunerStatus = tsTuned;
|
||||||
Timer.Set(lockTimeout);
|
Timer.Set(lockTimeout);
|
||||||
lastTimeoutReport = 0;
|
lastTimeoutReport = 0;
|
||||||
|
8
menu.c
8
menu.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: menu.c 3.25 2015/01/13 09:40:59 kls Exp $
|
* $Id: menu.c 3.26 2015/01/14 12:10:58 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
@ -4756,7 +4756,7 @@ bool cRecordControls::Start(cTimer *Timer, bool Pause)
|
|||||||
int Priority = Timer ? Timer->Priority() : Pause ? Setup.PausePriority : Setup.DefaultPriority;
|
int Priority = Timer ? Timer->Priority() : Pause ? Setup.PausePriority : Setup.DefaultPriority;
|
||||||
cDevice *device = cDevice::GetDevice(channel, Priority, false);
|
cDevice *device = cDevice::GetDevice(channel, Priority, false);
|
||||||
if (device) {
|
if (device) {
|
||||||
dsyslog("switching device %d to channel %d", device->DeviceNumber() + 1, channel->Number());
|
dsyslog("switching device %d to channel %d (%s)", device->DeviceNumber() + 1, channel->Number(), channel->Name());
|
||||||
if (!device->SwitchChannel(channel, false)) {
|
if (!device->SwitchChannel(channel, false)) {
|
||||||
ShutdownHandler.RequestEmergencyExit();
|
ShutdownHandler.RequestEmergencyExit();
|
||||||
return false;
|
return false;
|
||||||
@ -4771,7 +4771,7 @@ bool cRecordControls::Start(cTimer *Timer, bool Pause)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!Timer || !Timer->Pending()) {
|
else if (!Timer || !Timer->Pending()) {
|
||||||
isyslog("no free DVB device to record channel %d!", ch);
|
isyslog("no free DVB device to record channel %d (%s)!", ch, channel->Name());
|
||||||
Skins.Message(mtError, tr("No free DVB device to record!"));
|
Skins.Message(mtError, tr("No free DVB device to record!"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4866,7 +4866,7 @@ void cRecordControls::ChannelDataModified(cChannel *Channel)
|
|||||||
if (RecordControls[i]) {
|
if (RecordControls[i]) {
|
||||||
if (RecordControls[i]->Timer() && RecordControls[i]->Timer()->Channel() == Channel) {
|
if (RecordControls[i]->Timer() && RecordControls[i]->Timer()->Channel() == Channel) {
|
||||||
if (RecordControls[i]->Device()->ProvidesTransponder(Channel)) { // avoids retune on devices that don't really access the transponder
|
if (RecordControls[i]->Device()->ProvidesTransponder(Channel)) { // avoids retune on devices that don't really access the transponder
|
||||||
isyslog("stopping recording due to modification of channel %d", Channel->Number());
|
isyslog("stopping recording due to modification of channel %d (%s)", Channel->Number(), Channel->Name());
|
||||||
RecordControls[i]->Stop();
|
RecordControls[i]->Stop();
|
||||||
// This will restart the recording, maybe even from a different
|
// This will restart the recording, maybe even from a different
|
||||||
// device in case conditional access has changed.
|
// device in case conditional access has changed.
|
||||||
|
6
vdr.c
6
vdr.c
@ -22,7 +22,7 @@
|
|||||||
*
|
*
|
||||||
* The project's page is at http://www.tvdr.de
|
* The project's page is at http://www.tvdr.de
|
||||||
*
|
*
|
||||||
* $Id: vdr.c 3.13 2015/01/11 13:36:28 kls Exp $
|
* $Id: vdr.c 3.14 2015/01/14 12:11:41 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
@ -955,7 +955,7 @@ int main(int argc, char *argv[])
|
|||||||
if (Channel->Number() == cDevice::CurrentChannel() && cDevice::PrimaryDevice()->HasDecoder()) {
|
if (Channel->Number() == cDevice::CurrentChannel() && cDevice::PrimaryDevice()->HasDecoder()) {
|
||||||
if (!cDevice::PrimaryDevice()->Replaying() || cDevice::PrimaryDevice()->Transferring()) {
|
if (!cDevice::PrimaryDevice()->Replaying() || cDevice::PrimaryDevice()->Transferring()) {
|
||||||
if (cDevice::ActualDevice()->ProvidesTransponder(Channel)) { // avoids retune on devices that don't really access the transponder
|
if (cDevice::ActualDevice()->ProvidesTransponder(Channel)) { // avoids retune on devices that don't really access the transponder
|
||||||
isyslog("retuning due to modification of channel %d", Channel->Number());
|
isyslog("retuning due to modification of channel %d (%s)", Channel->Number(), Channel->Name());
|
||||||
Channels.SwitchTo(Channel->Number());
|
Channels.SwitchTo(Channel->Number());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1032,7 +1032,7 @@ int main(int argc, char *argv[])
|
|||||||
if (!Device->IsTunedToTransponder(Timer->Channel())) {
|
if (!Device->IsTunedToTransponder(Timer->Channel())) {
|
||||||
if (Device == cDevice::ActualDevice() && !Device->IsPrimaryDevice())
|
if (Device == cDevice::ActualDevice() && !Device->IsPrimaryDevice())
|
||||||
cDevice::PrimaryDevice()->StopReplay(); // stop transfer mode
|
cDevice::PrimaryDevice()->StopReplay(); // stop transfer mode
|
||||||
dsyslog("switching device %d to channel %d", Device->DeviceNumber() + 1, Timer->Channel()->Number());
|
dsyslog("switching device %d to channel %d (%s)", Device->DeviceNumber() + 1, Timer->Channel()->Number(), Timer->Channel()->Name());
|
||||||
if (Device->SwitchChannel(Timer->Channel(), false))
|
if (Device->SwitchChannel(Timer->Channel(), false))
|
||||||
Device->SetOccupied(TIMERDEVICETIMEOUT);
|
Device->SetOccupied(TIMERDEVICETIMEOUT);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user