diff options
| -rw-r--r-- | config.c | 26 | ||||
| -rw-r--r-- | config.h | 6 | ||||
| -rw-r--r-- | dvbapi.c | 126 | ||||
| -rw-r--r-- | dvbosd.c | 6 | ||||
| -rw-r--r-- | eit.c | 62 | ||||
| -rw-r--r-- | i18n.c | 4 | ||||
| -rw-r--r-- | interface.c | 12 | ||||
| -rw-r--r-- | menu.c | 48 | ||||
| -rw-r--r-- | osdbase.c | 16 | ||||
| -rw-r--r-- | plugin.c | 18 | ||||
| -rw-r--r-- | recording.c | 24 | ||||
| -rw-r--r-- | remote.c | 6 | ||||
| -rw-r--r-- | remux.c | 14 | ||||
| -rw-r--r-- | ringbuffer.c | 14 | ||||
| -rw-r--r-- | svdrp.c | 32 | ||||
| -rw-r--r-- | thread.c | 10 | ||||
| -rw-r--r-- | tools.c | 42 | ||||
| -rw-r--r-- | tools.h | 12 | ||||
| -rw-r--r-- | vdr.c | 30 | ||||
| -rw-r--r-- | videodir.c | 4 | 
20 files changed, 256 insertions, 256 deletions
| @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: config.c 1.100 2002/05/11 12:05:22 kls Exp $ + * $Id: config.c 1.101 2002/05/13 16:28:12 kls Exp $   */  #include "config.h" @@ -72,7 +72,7 @@ void cKeys::SetDummyValues(void)  bool cKeys::Load(const char *FileName)  { -  isyslog(LOG_INFO, "loading %s", FileName); +  isyslog("loading %s", FileName);    bool result = false;    if (FileName)       fileName = strdup(FileName); @@ -105,7 +105,7 @@ bool cKeys::Load(const char *FileName)                                   }                                }                             if (Name) { -                              esyslog(LOG_ERR, "unknown key in %s, line %d\n", fileName, line); +                              esyslog("unknown key in %s, line %d\n", fileName, line);                                result = false;                                break;                                } @@ -113,7 +113,7 @@ bool cKeys::Load(const char *FileName)                         }                      continue;                      } -                 esyslog(LOG_ERR, "error in %s, line %d\n", fileName, line); +                 esyslog("error in %s, line %d\n", fileName, line);                   result = false;                   break;                   } @@ -121,10 +121,10 @@ bool cKeys::Load(const char *FileName)          fclose(f);          }       else -        esyslog(LOG_ERR, "can't open '%s'\n", fileName); +        esyslog("can't open '%s'\n", fileName);       }    else -     esyslog(LOG_ERR, "no key configuration file name supplied!\n"); +     esyslog("no key configuration file name supplied!\n");    return result;  } @@ -299,7 +299,7 @@ bool cChannel::Switch(cDvbApi *DvbApi, bool Log)       DvbApi = cDvbApi::PrimaryDvbApi;    if (!DvbApi->Recording() && !groupSep) {       if (Log) -        isyslog(LOG_INFO, "switching to channel %d", number); +        isyslog("switching to channel %d", number);       for (int i = 3; i--;) {           switch (DvbApi->SetChannel(number, frequency, polarization, diseqc, srate, vpid, apid1, apid2, dpid1, dpid2, tpid, ca, pnr)) {             case scrOk:         return true; @@ -308,7 +308,7 @@ bool cChannel::Switch(cDvbApi *DvbApi, bool Log)                                 return false;             case scrFailed:     break; // loop will retry             } -         esyslog(LOG_ERR, "retrying"); +         esyslog("retrying");           }       return false;       } @@ -637,7 +637,7 @@ time_t cTimer::StopTime(void)  void cTimer::SetRecording(bool Recording)  {    recording = Recording; -  isyslog(LOG_INFO, "timer %d %s", Index() + 1, recording ? "start" : "stop"); +  isyslog("timer %d %s", Index() + 1, recording ? "start" : "stop");  }  void cTimer::SetPending(bool Pending) @@ -684,7 +684,7 @@ bool cCommand::Parse(const char *s)  const char *cCommand::Execute(void)  { -  dsyslog(LOG_INFO, "executing command '%s'", command); +  dsyslog("executing command '%s'", command);    delete result;    result = NULL;    FILE *p = popen(command, "r"); @@ -701,7 +701,7 @@ const char *cCommand::Execute(void)       pclose(p);       }    else -     esyslog(LOG_ERR, "ERROR: can't open pipe for command '%s'", command); +     esyslog("ERROR: can't open pipe for command '%s'", command);    return result;  } @@ -1084,7 +1084,7 @@ bool cSetup::Load(const char *FileName)                 error = true;              }           if (error) { -            esyslog(LOG_ERR, "ERROR: unknown config parameter: %s%s%s = %s", l->Plugin() ? l->Plugin() : "", l->Plugin() ? "." : "", l->Name(), l->Value()); +            esyslog("ERROR: unknown config parameter: %s%s%s = %s", l->Plugin() ? l->Plugin() : "", l->Plugin() ? "." : "", l->Name(), l->Value());              result = false;              }           } @@ -1225,7 +1225,7 @@ bool cSetup::Save(void)    Sort();    if (cConfig<cSetupLine>::Save()) { -     isyslog(LOG_INFO, "saved setup to %s", FileName()); +     isyslog("saved setup to %s", FileName());       return true;       }    return false; @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: config.h 1.115 2002/05/12 09:18:44 kls Exp $ + * $Id: config.h 1.116 2002/05/13 16:28:16 kls Exp $   */  #ifndef __CONFIG_H @@ -227,7 +227,7 @@ public:      fileName = strdup(FileName);      bool result = false;      if (access(FileName, F_OK) == 0) { -       isyslog(LOG_INFO, "loading %s", FileName); +       isyslog("loading %s", FileName);         FILE *f = fopen(fileName, "r");         if (f) {            int line = 0; @@ -245,7 +245,7 @@ public:                     if (l->Parse(buffer))                        Add(l);                     else { -                      esyslog(LOG_ERR, "error in %s, line %d\n", fileName, line); +                      esyslog("error in %s, line %d\n", fileName, line);                        delete l;                        result = false;                        break; @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: dvbapi.c 1.174 2002/05/03 15:59:32 kls Exp $ + * $Id: dvbapi.c 1.175 2002/05/13 16:29:17 kls Exp $   */  #include "dvbapi.h" @@ -137,7 +137,7 @@ cIndexFile::cIndexFile(const char *FileName, bool Record)                delta = buf.st_size % sizeof(tIndex);                if (delta) {                   delta = sizeof(tIndex) - delta; -                 esyslog(LOG_ERR, "ERROR: invalid file size (%ld) in '%s'", buf.st_size, fileName); +                 esyslog("ERROR: invalid file size (%ld) in '%s'", buf.st_size, fileName);                   }                last = (buf.st_size + delta) / sizeof(tIndex) - 1;                if (!Record && last >= 0) { @@ -147,7 +147,7 @@ cIndexFile::cIndexFile(const char *FileName, bool Record)                      f = open(fileName, O_RDONLY);                      if (f >= 0) {                         if ((int)safe_read(f, index, buf.st_size) != buf.st_size) { -                          esyslog(LOG_ERR, "ERROR: can't read from file '%s'", fileName); +                          esyslog("ERROR: can't read from file '%s'", fileName);                            delete index;                            index = NULL;                            close(f); @@ -159,18 +159,18 @@ cIndexFile::cIndexFile(const char *FileName, bool Record)                         LOG_ERROR_STR(fileName);                      }                   else -                    esyslog(LOG_ERR, "ERROR: can't allocate %d bytes for index '%s'", size * sizeof(tIndex), fileName); +                    esyslog("ERROR: can't allocate %d bytes for index '%s'", size * sizeof(tIndex), fileName);                   }                }             else                LOG_ERROR;             }          else if (!Record) -           isyslog(LOG_INFO, "missing index file %s", fileName); +           isyslog("missing index file %s", fileName);          if (Record) {             if ((f = open(fileName, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) >= 0) {                if (delta) { -                 esyslog(LOG_ERR, "ERROR: padding index file with %d '0' bytes", delta); +                 esyslog("ERROR: padding index file with %d '0' bytes", delta);                   while (delta--)                         writechar(f, 0);                   } @@ -180,7 +180,7 @@ cIndexFile::cIndexFile(const char *FileName, bool Record)             }          }       else -        esyslog(LOG_ERR, "ERROR: can't copy file name '%s'", FileName); +        esyslog("ERROR: can't copy file name '%s'", FileName);       }  } @@ -211,7 +211,7 @@ bool cIndexFile::CatchUp(int Index)                    int delta = (newLast - last) * sizeof(tIndex);                    if (lseek(f, offset, SEEK_SET) == offset) {                       if (safe_read(f, &index[last + 1], delta) != delta) { -                        esyslog(LOG_ERR, "ERROR: can't read from index"); +                        esyslog("ERROR: can't read from index");                          delete index;                          index = NULL;                          close(f); @@ -224,7 +224,7 @@ bool cIndexFile::CatchUp(int Index)                       LOG_ERROR_STR(fileName);                    }                 else -                  esyslog(LOG_ERR, "ERROR: can't realloc() index"); +                  esyslog("ERROR: can't realloc() index");                 }              }           else @@ -300,7 +300,7 @@ int cIndexFile::GetNextIFrame(int Index, bool Forward, uchar *FileNumber, int *F                    if (fn == *FileNumber)                       *Length = fo - *FileOffset;                    else { -                     esyslog(LOG_ERR, "ERROR: 'I' frame at end of file #%d", *FileNumber); +                     esyslog("ERROR: 'I' frame at end of file #%d", *FileNumber);                       *Length = -1;                       }                    } @@ -358,7 +358,7 @@ cFileName::cFileName(const char *FileName, bool Record, bool Blocking)    // Prepare the file name:    fileName = new char[strlen(FileName) + RECORDFILESUFFIXLEN];    if (!fileName) { -     esyslog(LOG_ERR, "ERROR: can't copy file name '%s'", fileName); +     esyslog("ERROR: can't copy file name '%s'", fileName);       return;       }    strcpy(fileName, FileName); @@ -377,14 +377,14 @@ int cFileName::Open(void)    if (file < 0) {       int BlockingFlag = blocking ? 0 : O_NONBLOCK;       if (record) { -        dsyslog(LOG_INFO, "recording to '%s'", fileName); +        dsyslog("recording to '%s'", fileName);          file = OpenVideoFile(fileName, O_RDWR | O_CREAT | BlockingFlag);          if (file < 0)             LOG_ERROR_STR(fileName);          }       else {          if (access(fileName, R_OK) == 0) { -           dsyslog(LOG_INFO, "playing '%s'", fileName); +           dsyslog("playing '%s'", fileName);             file = open(fileName, O_RDONLY | BlockingFlag);             if (file < 0)                LOG_ERROR_STR(fileName); @@ -429,7 +429,7 @@ int cFileName::SetOffset(int Number, int Offset)          }       return file;       } -  esyslog(LOG_ERR, "ERROR: max number of files (%d) exceeded", MAXFILESPERRECORDING); +  esyslog("ERROR: max number of files (%d) exceeded", MAXFILESPERRECORDING);    return -1;  } @@ -479,7 +479,7 @@ cRecordBuffer::cRecordBuffer(cDvbApi *DvbApi, const char *FileName, int VPid, in    // Create the index file:    index = new cIndexFile(FileName, true);    if (!index) -     esyslog(LOG_ERR, "ERROR: can't allocate index"); +     esyslog("ERROR: can't allocate index");       // let's continue without index, so we'll at least have the recording    videoDev = dvbApi->SetModeRecord();    Start(); @@ -498,7 +498,7 @@ bool cRecordBuffer::RunningLowOnDiskSpace(void)       int Free = FreeDiskSpaceMB(fileName.Name());       lastDiskSpaceCheck = time(NULL);       if (Free < MINFREEDISKSPACE) { -        dsyslog(LOG_INFO, "low disk space (%d MB, limit is %d MB)", Free, MINFREEDISKSPACE); +        dsyslog("low disk space (%d MB, limit is %d MB)", Free, MINFREEDISKSPACE);          return true;          }       } @@ -518,7 +518,7 @@ bool cRecordBuffer::NextFile(void)  void cRecordBuffer::Input(void)  { -  dsyslog(LOG_INFO, "input thread started (pid=%d)", getpid()); +  dsyslog("input thread started (pid=%d)", getpid());    uchar b[MINVIDEODATA];    time_t t = time(NULL); @@ -540,7 +540,7 @@ void cRecordBuffer::Input(void)           else if (r < 0) {              if (FATALERRNO) {                 if (errno == EBUFFEROVERFLOW) // this error code is not defined in the library -                  esyslog(LOG_ERR, "ERROR (%s,%d): DVB driver buffer overflow", __FILE__, __LINE__); +                  esyslog("ERROR (%s,%d): DVB driver buffer overflow", __FILE__, __LINE__);                 else {                    LOG_ERROR;                    break; @@ -549,7 +549,7 @@ void cRecordBuffer::Input(void)              }           }        if (time(NULL) - t > MAXBROKENTIMEOUT) { -         esyslog(LOG_ERR, "ERROR: video data stream broken"); +         esyslog("ERROR: video data stream broken");           cThread::EmergencyExit(true);           t = time(NULL);           } @@ -557,12 +557,12 @@ void cRecordBuffer::Input(void)           break;        } -  dsyslog(LOG_INFO, "input thread ended (pid=%d)", getpid()); +  dsyslog("input thread ended (pid=%d)", getpid());  }  void cRecordBuffer::Output(void)  { -  dsyslog(LOG_INFO, "output thread started (pid=%d)", getpid()); +  dsyslog("output thread started (pid=%d)", getpid());    uchar b[MINVIDEODATA];    int r = 0; @@ -601,7 +601,7 @@ void cRecordBuffer::Output(void)        }    recording = false; -  dsyslog(LOG_INFO, "output thread ended (pid=%d)", getpid()); +  dsyslog("output thread ended (pid=%d)", getpid());  }  // --- ReadFrame ------------------------------------------------------------- @@ -611,7 +611,7 @@ int ReadFrame(int f, uchar *b, int Length, int Max)    if (Length == -1)       Length = Max; // this means we read up to EOF (see cIndex)    else if (Length > Max) { -     esyslog(LOG_ERR, "ERROR: frame larger than buffer (%d > %d)", Length, Max); +     esyslog("ERROR: frame larger than buffer (%d > %d)", Length, Max);       Length = Max;       }    int r = safe_read(f, b, Length); @@ -751,7 +751,7 @@ void cPlayBuffer::PlayExternalDolby(const uchar *b, int MaxLength)  {    if (cDvbApi::AudioCommand()) {       if (!dolbyDev && !dolbyDev.Open(cDvbApi::AudioCommand(), "w")) { -        esyslog(LOG_ERR, "ERROR: can't open pipe to audio command '%s'", cDvbApi::AudioCommand()); +        esyslog("ERROR: can't open pipe to audio command '%s'", cDvbApi::AudioCommand());          return;          }       if (b[0] == 0x00 && b[1] == 0x00 && b[2] == 0x01) { @@ -775,7 +775,7 @@ void cPlayBuffer::PlayExternalDolby(const uchar *b, int MaxLength)  void cPlayBuffer::Output(void)  { -  dsyslog(LOG_INFO, "output thread started (pid=%d)", getpid()); +  dsyslog("output thread started (pid=%d)", getpid());    while (Busy()) {          if (blockOutput) { @@ -812,7 +812,7 @@ void cPlayBuffer::Output(void)             }          } -  dsyslog(LOG_INFO, "output thread ended (pid=%d)", getpid()); +  dsyslog("output thread ended (pid=%d)", getpid());  }  void cPlayBuffer::putFrame(cFrame *Frame) @@ -1051,7 +1051,7 @@ cReplayBuffer::cReplayBuffer(cDvbApi *DvbApi, int VideoDev, int AudioDev, const    // Create the index file:    index = new cIndexFile(FileName, false);    if (!index) -     esyslog(LOG_ERR, "ERROR: can't allocate index"); +     esyslog("ERROR: can't allocate index");    else if (!index->Ok()) {       delete index;       index = NULL; @@ -1072,11 +1072,11 @@ cReplayBuffer::~cReplayBuffer()  void cReplayBuffer::Input(void)  { -  dsyslog(LOG_INFO, "input thread started (pid=%d)", getpid()); +  dsyslog("input thread started (pid=%d)", getpid());    readIndex = Resume();    if (readIndex >= 0) -     isyslog(LOG_INFO, "resuming replay at index %d (%s)", readIndex, IndexToHMSF(readIndex, true)); +     isyslog("resuming replay at index %d (%s)", readIndex, IndexToHMSF(readIndex, true));    uchar b[MAXFRAMESIZE];    while (Busy() && (blockInput || NextFile())) { @@ -1134,7 +1134,7 @@ void cReplayBuffer::Input(void)             usleep(1); // this keeps the CPU load low          } -  dsyslog(LOG_INFO, "input thread ended (pid=%d)", getpid()); +  dsyslog("input thread ended (pid=%d)", getpid());  }  void cReplayBuffer::StripAudioPackets(uchar *b, int Length, uchar Except) @@ -1161,7 +1161,7 @@ void cReplayBuffer::StripAudioPackets(uchar *b, int Length, uchar Except)                case 0xE0 ... 0xEF: // video                     break;                default: -                   //esyslog(LOG_ERR, "ERROR: unexpected packet id %02X", c); +                   //esyslog("ERROR: unexpected packet id %02X", c);                     l = 0;                }              if (l) @@ -1169,7 +1169,7 @@ void cReplayBuffer::StripAudioPackets(uchar *b, int Length, uchar Except)              }           /*XXX           else -            esyslog(LOG_ERR, "ERROR: broken packet header"); +            esyslog("ERROR: broken packet header");              XXX*/           }       } @@ -1370,7 +1370,7 @@ void cTransferBuffer::SetAudioPid(int APid)  void cTransferBuffer::Input(void)  { -  dsyslog(LOG_INFO, "input thread started (pid=%d)", getpid()); +  dsyslog("input thread started (pid=%d)", getpid());    uchar b[MINVIDEODATA];    int n = 0; @@ -1396,7 +1396,7 @@ void cTransferBuffer::Input(void)             else if (r < 0) {                if (FATALERRNO) {                   if (errno == EBUFFEROVERFLOW) // this error code is not defined in the library -                    esyslog(LOG_ERR, "ERROR (%s,%d): DVB driver buffer overflow", __FILE__, __LINE__); +                    esyslog("ERROR (%s,%d): DVB driver buffer overflow", __FILE__, __LINE__);                   else {                      LOG_ERROR;                      break; @@ -1406,12 +1406,12 @@ void cTransferBuffer::Input(void)             }          } -  dsyslog(LOG_INFO, "input thread ended (pid=%d)", getpid()); +  dsyslog("input thread ended (pid=%d)", getpid());  }  void cTransferBuffer::Output(void)  { -  dsyslog(LOG_INFO, "output thread started (pid=%d)", getpid()); +  dsyslog("output thread started (pid=%d)", getpid());    uchar b[MINVIDEODATA];    while (Busy()) { @@ -1443,7 +1443,7 @@ void cTransferBuffer::Output(void)             usleep(1); // this keeps the CPU load low          } -  dsyslog(LOG_INFO, "output thread ended (pid=%d)", getpid()); +  dsyslog("output thread ended (pid=%d)", getpid());  }  // --- cCuttingBuffer -------------------------------------------------------- @@ -1480,7 +1480,7 @@ cCuttingBuffer::cCuttingBuffer(const char *FromFileName, const char *ToFileName)       Start();       }    else -     esyslog(LOG_ERR, "no editing marks found for %s", FromFileName); +     esyslog("no editing marks found for %s", FromFileName);  }  cCuttingBuffer::~cCuttingBuffer() @@ -1495,7 +1495,7 @@ cCuttingBuffer::~cCuttingBuffer()  void cCuttingBuffer::Action(void)  { -  dsyslog(LOG_INFO, "video cutting thread started (pid=%d)", getpid()); +  dsyslog("video cutting thread started (pid=%d)", getpid());    cMark *Mark = fromMarks.First();    if (Mark) { @@ -1596,8 +1596,8 @@ void cCuttingBuffer::Action(void)             }       }    else -     esyslog(LOG_ERR, "no editing marks found!"); -  dsyslog(LOG_INFO, "end video cutting thread"); +     esyslog("no editing marks found!"); +  dsyslog("end video cutting thread");  }  // --- cVideoCutter ---------------------------------------------------------- @@ -1644,9 +1644,9 @@ void cVideoCutter::Stop(void)    cuttingBuffer = NULL;    if ((Interrupted || Error) && editedVersionName) {       if (Interrupted) -        isyslog(LOG_INFO, "editing process has been interrupted"); +        isyslog("editing process has been interrupted");       if (Error) -        esyslog(LOG_ERR, "ERROR: '%s' during editing process", Error); +        esyslog("ERROR: '%s' during editing process", Error);       RemoveVideoFile(editedVersionName); //XXX what if this file is currently being replayed?       }  } @@ -1755,7 +1755,7 @@ cDvbApi::cDvbApi(int n)       frontendType = feinfo.type;       }    else -     esyslog(LOG_ERR, "ERROR: can't open video device %d", n); +     esyslog("ERROR: can't open video device %d", n);    cols = rows = 0;  #if defined(DEBUG_OSD) || defined(REMOTE_KBD) @@ -1803,11 +1803,11 @@ bool cDvbApi::SetPrimaryDvbApi(int n)  {    n--;    if (0 <= n && n < NumDvbApis && dvbApi[n]) { -     isyslog(LOG_INFO, "setting primary DVB to %d", n + 1); +     isyslog("setting primary DVB to %d", n + 1);       PrimaryDvbApi = dvbApi[n];       return true;       } -  esyslog(LOG_ERR, "invalid DVB interface: %d", n + 1); +  esyslog("invalid DVB interface: %d", n + 1);    return false;  } @@ -1906,7 +1906,7 @@ int cDvbApi::ProvidesCa(int Ca)  bool cDvbApi::Probe(const char *FileName)  {    if (access(FileName, F_OK) == 0) { -     dsyslog(LOG_INFO, "probing %s", FileName); +     dsyslog("probing %s", FileName);       int f = open(FileName, O_RDONLY);       if (f >= 0) {          close(f); @@ -1933,9 +1933,9 @@ bool cDvbApi::Init(void)        }    PrimaryDvbApi = dvbApi[0];    if (NumDvbApis > 0) -     isyslog(LOG_INFO, "found %d video device%s", NumDvbApis, NumDvbApis > 1 ? "s" : ""); +     isyslog("found %d video device%s", NumDvbApis, NumDvbApis > 1 ? "s" : "");    else -     esyslog(LOG_ERR, "ERROR: no video device found, giving up!"); +     esyslog("ERROR: no video device found, giving up!");    SetCaCaps();    return NumDvbApis > 0;  } @@ -1990,7 +1990,7 @@ bool cDvbApi::GrabImage(const char *FileName, bool Jpeg, int Quality, int SizeX,             if (Quality < 0)                Quality = 255; //XXX is this 'best'??? -           isyslog(LOG_INFO, "grabbing to %s (%s %d %d %d)", FileName, Jpeg ? "JPEG" : "PNM", Quality, vm.width, vm.height); +           isyslog("grabbing to %s (%s %d %d %d)", FileName, Jpeg ? "JPEG" : "PNM", Quality, vm.width, vm.height);             FILE *f = fopen(FileName, "wb");             if (f) {                if (Jpeg) { @@ -2446,7 +2446,7 @@ eSetChannelResult cDvbApi::SetChannel(int ChannelNumber, int Frequency, char Pol              }              break;         default: -            esyslog(LOG_ERR, "ERROR: attempt to set channel with unknown DVB frontend type"); +            esyslog("ERROR: attempt to set channel with unknown DVB frontend type");              return scrFailed;         } @@ -2461,22 +2461,22 @@ eSetChannelResult cDvbApi::SetChannel(int ChannelNumber, int Frequency, char Pol          int res = ioctl(fd_frontend, FE_GET_EVENT, &event);          if (res >= 0) {             if (event.type != FE_COMPLETION_EV) { -              esyslog(LOG_ERR, "ERROR: channel %d not sync'ed on DVB card %d!", ChannelNumber, CardIndex() + 1); +              esyslog("ERROR: channel %d not sync'ed on DVB card %d!", ChannelNumber, CardIndex() + 1);                if (this == PrimaryDvbApi)                   cThread::RaisePanic();                return scrFailed;                }             }          else -           esyslog(LOG_ERR, "ERROR %d in frontend get event (channel %d, card %d)", res, ChannelNumber, CardIndex() + 1); +           esyslog("ERROR %d in frontend get event (channel %d, card %d)", res, ChannelNumber, CardIndex() + 1);          }       else -        esyslog(LOG_ERR, "ERROR: timeout while tuning"); +        esyslog("ERROR: timeout while tuning");       // PID settings:       if (!SetPids(false)) { -        esyslog(LOG_ERR, "ERROR: failed to set PIDs for channel %d", ChannelNumber); +        esyslog("ERROR: failed to set PIDs for channel %d", ChannelNumber);          return scrFailed;          }       SetTpid(Tpid, DMX_OUT_DECODER); @@ -2563,7 +2563,7 @@ bool cDvbApi::Replaying(void)  bool cDvbApi::StartRecord(const char *FileName, int Ca, int Priority)  {    if (Recording()) { -     esyslog(LOG_ERR, "ERROR: StartRecord() called while recording - ignored!"); +     esyslog("ERROR: StartRecord() called while recording - ignored!");       return false;       } @@ -2574,10 +2574,10 @@ bool cDvbApi::StartRecord(const char *FileName, int Ca, int Priority)    // Check FileName:    if (!FileName) { -     esyslog(LOG_ERR, "ERROR: StartRecord: file name is (null)"); +     esyslog("ERROR: StartRecord: file name is (null)");       return false;       } -  isyslog(LOG_INFO, "record %s", FileName); +  isyslog("record %s", FileName);    // Create directories if necessary: @@ -2598,7 +2598,7 @@ bool cDvbApi::StartRecord(const char *FileName, int Ca, int Priority)       return true;       }    else -     esyslog(LOG_ERR, "ERROR: can't allocate recording buffer"); +     esyslog("ERROR: can't allocate recording buffer");    return false;  } @@ -2616,7 +2616,7 @@ void cDvbApi::StopRecord(void)  bool cDvbApi::StartReplay(const char *FileName)  {    if (Recording()) { -     esyslog(LOG_ERR, "ERROR: StartReplay() called while recording - ignored!"); +     esyslog("ERROR: StartReplay() called while recording - ignored!");       return false;       }    StopTransfer(); @@ -2626,10 +2626,10 @@ bool cDvbApi::StartReplay(const char *FileName)       // Check FileName:       if (!FileName) { -        esyslog(LOG_ERR, "ERROR: StartReplay: file name is (null)"); +        esyslog("ERROR: StartReplay: file name is (null)");          return false;          } -     isyslog(LOG_INFO, "replay %s", FileName); +     isyslog("replay %s", FileName);       // Create replay buffer: @@ -2637,7 +2637,7 @@ bool cDvbApi::StartReplay(const char *FileName)       if (replayBuffer)          return true;       else -        esyslog(LOG_ERR, "ERROR: can't allocate replaying buffer"); +        esyslog("ERROR: can't allocate replaying buffer");       }    return false;  } @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: dvbosd.c 1.14 2002/05/10 14:22:04 kls Exp $ + * $Id: dvbosd.c 1.15 2002/05/13 16:29:20 kls Exp $   */  #include "dvbosd.h" @@ -18,7 +18,7 @@ cDvbOsd::cDvbOsd(int VideoDev, int x, int y)  {    videoDev = VideoDev;    if (videoDev < 0) -     esyslog(LOG_ERR, "ERROR: illegal video device handle (%d)!", videoDev); +     esyslog("ERROR: illegal video device handle (%d)!", videoDev);  }  cDvbOsd::~cDvbOsd() @@ -37,7 +37,7 @@ bool cDvbOsd::SetWindow(cWindow *Window)          Cmd(OSD_SetWindow, 0, Handle + 1);          return true;          } -     esyslog(LOG_ERR, "ERROR: illegal window handle: %d", Handle); +     esyslog("ERROR: illegal window handle: %d", Handle);       }    return false;  } @@ -16,7 +16,7 @@   *   the Free Software Foundation; either version 2 of the License, or     *   *   (at your option) any later version.                                   *   *                                                                         * - * $Id: eit.c 1.44 2002/04/06 13:58:59 kls Exp $ + * $Id: eit.c 1.45 2002/05/13 16:35:49 kls Exp $   ***************************************************************************/  #include "eit.h" @@ -117,7 +117,7 @@ void cMJD::ConvertToTime()     mjdtime = timegm(&t); -   //isyslog(LOG_INFO, "Time parsed = %s\n", ctime(&mjdtime)); +   //isyslog("Time parsed = %s\n", ctime(&mjdtime));  }  /**  */ @@ -132,10 +132,10 @@ bool cMJD::SetSystemTime()     if (abs(mjdtime - loctim) > 2)     { -      isyslog(LOG_INFO, "System Time = %s (%ld)\n", ctime(&loctim), loctim); -      isyslog(LOG_INFO, "Local Time  = %s (%ld)\n", ctime(&mjdtime), mjdtime); +      isyslog("System Time = %s (%ld)\n", ctime(&loctim), loctim); +      isyslog("Local Time  = %s (%ld)\n", ctime(&mjdtime), mjdtime);        if (stime(&mjdtime) < 0) -         esyslog(LOG_ERR, "ERROR while setting system time: %m"); +         esyslog("ERROR while setting system time: %m");        return true;     } @@ -391,11 +391,11 @@ bool cEventInfo::Read(FILE *f, cSchedule *Schedule)                         break;               case 'c': // to keep things simple we react on 'c' here                         return true; -             default:  esyslog(LOG_ERR, "ERROR: unexpected tag while reading EPG data: %s", s); +             default:  esyslog("ERROR: unexpected tag while reading EPG data: %s", s);                         return false;               }             } -     esyslog(LOG_ERR, "ERROR: unexpected end of file while reading EPG data"); +     esyslog("ERROR: unexpected end of file while reading EPG data");       }    return false;  } @@ -436,14 +436,14 @@ static void ReportEpgBugFixStats(bool Reset = false)           tEpgBugFixStats *p = &EpgBugFixStats[i];           if (p->hits) {              if (!GotHits) { -               dsyslog(LOG_INFO, "====================="); -               dsyslog(LOG_INFO, "EPG bugfix statistics"); -               dsyslog(LOG_INFO, "====================="); -               dsyslog(LOG_INFO, "IF SOMEBODY WHO IS IN CHARGE OF THE EPG DATA FOR ONE OF THE LISTED"); -               dsyslog(LOG_INFO, "CHANNELS READS THIS: PLEASE TAKE A LOOK AT THE FUNCTION cEventInfo::FixEpgBugs()"); -               dsyslog(LOG_INFO, "IN VDR/eit.c TO LEARN WHAT'S WRONG WITH YOUR DATA, AND FIX IT!"); -               dsyslog(LOG_INFO, "====================="); -               dsyslog(LOG_INFO, "Fix\tHits\tChannels"); +               dsyslog("====================="); +               dsyslog("EPG bugfix statistics"); +               dsyslog("====================="); +               dsyslog("IF SOMEBODY WHO IS IN CHARGE OF THE EPG DATA FOR ONE OF THE LISTED"); +               dsyslog("CHANNELS READS THIS: PLEASE TAKE A LOOK AT THE FUNCTION cEventInfo::FixEpgBugs()"); +               dsyslog("IN VDR/eit.c TO LEARN WHAT'S WRONG WITH YOUR DATA, AND FIX IT!"); +               dsyslog("====================="); +               dsyslog("Fix\tHits\tChannels");                 GotHits = true;                 }              char *q = buffer; @@ -455,13 +455,13 @@ static void ReportEpgBugFixStats(bool Reset = false)                     delim = ", ";                     }                  } -            dsyslog(LOG_INFO, "%s", buffer); +            dsyslog("%s", buffer);              }           if (Reset)              p->hits = p->n = 0;           }       if (GotHits) -        dsyslog(LOG_INFO, "====================="); +        dsyslog("=====================");       }  } @@ -760,7 +760,7 @@ bool cSchedule::Read(FILE *f, cSchedules *Schedules)                   }                }             else { -              esyslog(LOG_ERR, "ERROR: unexpected tag while reading EPG data: %s", s); +              esyslog("ERROR: unexpected tag while reading EPG data: %s", s);                return false;                }             } @@ -1015,7 +1015,7 @@ bool cSIProcessor::Read(FILE *f)    if (OwnFile) {       const char *FileName = GetEpgDataFileName();       if (access(FileName, R_OK) == 0) { -        dsyslog(LOG_INFO, "reading EPG data from %s", FileName); +        dsyslog("reading EPG data from %s", FileName);          if ((f = fopen(FileName, "r")) == NULL) {             LOG_ERROR;             return false; @@ -1065,7 +1065,7 @@ information and let the classes corresponding  to the tables write their information to the disk */  void cSIProcessor::Action()  { -   dsyslog(LOG_INFO, "EIT processing thread started (pid=%d)%s", getpid(), masterSIProcessor ? " - master" : ""); +   dsyslog("EIT processing thread started (pid=%d)%s", getpid(), masterSIProcessor ? " - master" : "");     time_t lastCleanup = time(NULL);     time_t lastDump = time(NULL); @@ -1082,7 +1082,7 @@ void cSIProcessor::Action()           if (now - lastCleanup > 3600 && ptm->tm_hour == 5)           {              cMutexLock MutexLock(&schedulesMutex); -            isyslog(LOG_INFO, "cleaning up schedules data"); +            isyslog("cleaning up schedules data");              schedules->Cleanup();              lastCleanup = now;              ReportEpgBugFixStats(true); @@ -1131,7 +1131,7 @@ void cSIProcessor::Action()                    if (n == seclen)                    {                       seclen += 3; -                     //dsyslog(LOG_INFO, "Received pid 0x%02x with table ID 0x%02x and length of %04d\n", pid, buf[0], seclen); +                     //dsyslog("Received pid 0x%02x with table ID 0x%02x and length of %04d\n", pid, buf[0], seclen);                       switch (pid)                       {                          case 0x14: @@ -1145,7 +1145,7 @@ void cSIProcessor::Action()                             }                                /*XXX this comes pretty often:                             else -                              dsyslog(LOG_INFO, "Time packet was not 0x70 but 0x%02x\n", (int)buf[0]); +                              dsyslog("Time packet was not 0x70 but 0x%02x\n", (int)buf[0]);                                XXX*/                             break; @@ -1157,7 +1157,7 @@ void cSIProcessor::Action()                                ceit.ProcessEIT(buf);                             }                             else -                              dsyslog(LOG_INFO, "Received stuffing section in EIT\n"); +                              dsyslog("Received stuffing section in EIT\n");                             break;                          default: @@ -1166,7 +1166,7 @@ void cSIProcessor::Action()                    }                    /*XXX this just fills up the log file - shouldn't we rather try to re-sync?                    else -                     dsyslog(LOG_INFO, "read incomplete section - seclen = %d, n = %d", seclen, n); +                     dsyslog("read incomplete section - seclen = %d, n = %d", seclen, n);                    XXX*/                 }              } @@ -1174,7 +1174,7 @@ void cSIProcessor::Action()        }     } -   dsyslog(LOG_INFO, "EIT processing thread ended (pid=%d)%s", getpid(), masterSIProcessor ? " - master" : ""); +   dsyslog("EIT processing thread ended (pid=%d)%s", getpid(), masterSIProcessor ? " - master" : "");  }  /** Add a filter with packet identifier pid and @@ -1202,21 +1202,21 @@ bool cSIProcessor::AddFilter(u_char pid, u_char tid)                 filters[a].inuse = true;              else              { -               esyslog(LOG_ERR, "ERROR: can't set filter"); +               esyslog("ERROR: can't set filter");                 close(filters[a].handle);                 return false;              } -            // dsyslog(LOG_INFO, "  Registered filter handle %04x, pid = %02d, tid = %02d", filters[a].handle, filters[a].pid, filters[a].tid); +            // dsyslog("Registered filter handle %04x, pid = %02d, tid = %02d", filters[a].handle, filters[a].pid, filters[a].tid);           }           else           { -            esyslog(LOG_ERR, "ERROR: can't open filter handle"); +            esyslog("ERROR: can't open filter handle");              return false;           }           return true;        }     } -   esyslog(LOG_ERR, "ERROR: too many filters"); +   esyslog("ERROR: too many filters");     return false;  } @@ -1229,7 +1229,7 @@ bool cSIProcessor::ShutDownFilters(void)        if (filters[a].inuse)        {           close(filters[a].handle); -         // dsyslog(LOG_INFO, "Deregistered filter handle %04x, pid = %02d, tid = %02d", filters[a].handle, filters[a].pid, filters[a].tid); +         // dsyslog("Deregistered filter handle %04x, pid = %02d, tid = %02d", filters[a].handle, filters[a].pid, filters[a].tid);           filters[a].inuse = false;        }     } @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: i18n.c 1.88 2002/05/11 11:43:38 kls Exp $ + * $Id: i18n.c 1.89 2002/05/13 16:30:00 kls Exp $   *   * Translations provided by:   * @@ -2495,7 +2495,7 @@ const char *I18nTranslate(const char *s, const char *Plugin)               }           p = Phrases;           } -     esyslog(LOG_ERR, "%s%sno translation found for '%s' in language %d (%s)\n", Plugin ? Plugin : "", Plugin ? ": " : "", s, Setup.OSDLanguage, Phrases[0][Setup.OSDLanguage]); +     esyslog("%s%sno translation found for '%s' in language %d (%s)\n", Plugin ? Plugin : "", Plugin ? ": " : "", s, Setup.OSDLanguage, Phrases[0][Setup.OSDLanguage]);       }    const char *p = strchr(s, '$');    return p ? p + 1 : s; diff --git a/interface.c b/interface.c index 59652244..0731f0d4 100644 --- a/interface.c +++ b/interface.c @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: interface.c 1.47 2002/01/27 16:00:31 kls Exp $ + * $Id: interface.c 1.48 2002/05/13 16:30:22 kls Exp $   */  #include "interface.h" @@ -303,7 +303,7 @@ void cInterface::Status(const char *s, eDvbColor FgColor, eDvbColor BgColor)  void cInterface::Info(const char *s)  {    Open(Setup.OSDwidth, -1); -  isyslog(LOG_INFO, "info: %s", s); +  isyslog("info: %s", s);    Status(s, clrBlack, clrGreen);    Wait();    Status(NULL); @@ -313,7 +313,7 @@ void cInterface::Info(const char *s)  void cInterface::Error(const char *s)  {    Open(Setup.OSDwidth, -1); -  esyslog(LOG_ERR, "ERROR: %s", s); +  esyslog("ERROR: %s", s);    Status(s, clrWhite, clrRed);    Wait();    Status(NULL); @@ -323,13 +323,13 @@ void cInterface::Error(const char *s)  bool cInterface::Confirm(const char *s, int Seconds, bool WaitForTimeout)  {    Open(Setup.OSDwidth, -1); -  isyslog(LOG_INFO, "confirm: %s", s); +  isyslog("confirm: %s", s);    Status(s, clrBlack, clrYellow);    eKeys k = Wait(Seconds);    bool result = WaitForTimeout ? k == kNone : k == kOk;    Status(NULL);    Close(); -  isyslog(LOG_INFO, "%sconfirmed", result ? "" : "not "); +  isyslog("%sconfirmed", result ? "" : "not ");    return result;  } @@ -441,7 +441,7 @@ void cInterface::QueryKeys(void)  void cInterface::LearnKeys(void)  { -  isyslog(LOG_INFO, "learning keys"); +  isyslog("learning keys");    Open();    for (;;) {        Clear(); @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: menu.c 1.191 2002/05/11 11:16:32 kls Exp $ + * $Id: menu.c 1.192 2002/05/13 16:30:50 kls Exp $   */  #include "menu.h" @@ -514,7 +514,7 @@ eOSState cMenuChannels::Edit(void)  {    if (HasSubMenu() || Count() == 0)       return osContinue; -  isyslog(LOG_INFO, "editing channel %d", Current() + 1); +  isyslog("editing channel %d", Current() + 1);    return AddSubMenu(new cMenuEditChannel(Current()));  } @@ -527,7 +527,7 @@ eOSState cMenuChannels::New(void)    Channels.ReNumber();    Add(new cMenuChannelItem(channel->Index()/*XXX*/, channel), true);    Channels.Save(); -  isyslog(LOG_INFO, "channel %d added", channel->number); +  isyslog("channel %d added", channel->number);    return AddSubMenu(new cMenuEditChannel(Current()));  } @@ -553,7 +553,7 @@ eOSState cMenuChannels::Del(void)          for (cMenuChannelItem *ci = (cMenuChannelItem *)First(); ci; ci = (cMenuChannelItem *)ci->Next())              ci->SetIndex(i++);          Channels.Save(); -        isyslog(LOG_INFO, "channel %d deleted", DeletedChannel); +        isyslog("channel %d deleted", DeletedChannel);          // Fix the timers:          bool TimersModified = false;          for (cTimer *ti = Timers.First(); ti; ti = (cTimer *)ti->Next()) { @@ -562,7 +562,7 @@ eOSState cMenuChannels::Del(void)                 ti->channel--;              if (ti->channel != OldChannel) {                 TimersModified = true; -               isyslog(LOG_INFO, "timer %d: channel changed from %d to %d", ti->Index() + 1, OldChannel, ti->channel); +               isyslog("timer %d: channel changed from %d to %d", ti->Index() + 1, OldChannel, ti->channel);                 }              }          if (TimersModified) @@ -585,7 +585,7 @@ void cMenuChannels::Move(int From, int To)    for (cMenuChannelItem *ci = (cMenuChannelItem *)First(); ci; ci = (cMenuChannelItem *)ci->Next())        ci->SetIndex(i++);    Channels.Save(); -  isyslog(LOG_INFO, "channel %d moved to %d", FromNumber, ToNumber); +  isyslog("channel %d moved to %d", FromNumber, ToNumber);    // Fix the timers:    bool TimersModified = false;    From++; // user visible channel numbers start with '1' @@ -600,7 +600,7 @@ void cMenuChannels::Move(int From, int To)           ti->channel++;        if (ti->channel != OldChannel) {           TimersModified = true; -         isyslog(LOG_INFO, "timer %d: channel changed from %d to %d", ti->Index() + 1, OldChannel, ti->channel); +         isyslog("timer %d: channel changed from %d to %d", ti->Index() + 1, OldChannel, ti->channel);           }        }    if (TimersModified) @@ -714,7 +714,7 @@ eOSState cMenuEditTimer::ProcessKey(eKeys Key)                          if (timer->active)                             timer->active = 1; // allows external programs to mark active timers with values > 1 and recognize if the user has modified them                          Timers.Save(); -                        isyslog(LOG_INFO, "timer %d modified (%s)", timer->Index() + 1, timer->active ? "active" : "inactive"); +                        isyslog("timer %d modified (%s)", timer->Index() + 1, timer->active ? "active" : "inactive");                          }                       return osBack;         case kRed: @@ -822,9 +822,9 @@ eOSState cMenuTimers::OnOff(void)       RefreshCurrent();       DisplayCurrent(true);       if (timer->firstday) -        isyslog(LOG_INFO, "timer %d first day set to %s", timer->Index() + 1, timer->PrintFirstDay()); +        isyslog("timer %d first day set to %s", timer->Index() + 1, timer->PrintFirstDay());       else -        isyslog(LOG_INFO, "timer %d %sactivated", timer->Index() + 1, timer->active ? "" : "de"); +        isyslog("timer %d %sactivated", timer->Index() + 1, timer->active ? "" : "de");       Timers.Save();       }    return osContinue; @@ -834,7 +834,7 @@ eOSState cMenuTimers::Edit(void)  {    if (HasSubMenu() || Count() == 0)       return osContinue; -  isyslog(LOG_INFO, "editing timer %d", CurrentTimer()->Index() + 1); +  isyslog("editing timer %d", CurrentTimer()->Index() + 1);    return AddSubMenu(new cMenuEditTimer(CurrentTimer()->Index()));  } @@ -846,7 +846,7 @@ eOSState cMenuTimers::New(void)    Timers.Add(timer);    Add(new cMenuTimerItem(timer), true);    Timers.Save(); -  isyslog(LOG_INFO, "timer %d added", timer->Index() + 1); +  isyslog("timer %d added", timer->Index() + 1);    return AddSubMenu(new cMenuEditTimer(timer->Index(), true));  } @@ -862,7 +862,7 @@ eOSState cMenuTimers::Del(void)             cOsdMenu::Del(Current());             Timers.Save();             Display(); -           isyslog(LOG_INFO, "timer %d deleted", Index + 1); +           isyslog("timer %d deleted", Index + 1);             }          }       else @@ -877,7 +877,7 @@ void cMenuTimers::Move(int From, int To)    cOsdMenu::Move(From, To);    Timers.Save();    Display(); -  isyslog(LOG_INFO, "timer %d moved to %d", From + 1, To + 1); +  isyslog("timer %d moved to %d", From + 1, To + 1);  }  eOSState cMenuTimers::Summary(void) @@ -1068,7 +1068,7 @@ eOSState cMenuWhatsOn::Record(void)       if (!t) {          Timers.Add(timer);          Timers.Save(); -        isyslog(LOG_INFO, "timer %d added", timer->Index() + 1); +        isyslog("timer %d added", timer->Index() + 1);          }       else {          delete timer; @@ -1201,7 +1201,7 @@ eOSState cMenuSchedule::Record(void)       if (!t) {          Timers.Add(timer);          Timers.Save(); -        isyslog(LOG_INFO, "timer %d added", timer->Index() + 1); +        isyslog("timer %d added", timer->Index() + 1);          }       else {          delete timer; @@ -2426,7 +2426,7 @@ cRecordControl::cRecordControl(cDvbApi *DvbApi, cTimer *Timer)          Title = eventInfo->GetTitle();          Subtitle = eventInfo->GetSubtitle();          Summary = eventInfo->GetExtendedDescription(); -        dsyslog(LOG_INFO, "Title: '%s' Subtitle: '%s'", Title, Subtitle); +        dsyslog("Title: '%s' Subtitle: '%s'", Title, Subtitle);          }       cRecording Recording(timer, Title, Subtitle, Summary);       fileName = strdup(Recording.FileName()); @@ -2462,17 +2462,17 @@ bool cRecordControl::GetEventInfo(void)                eventInfo = Schedule->GetEventAround(Time);                if (eventInfo) {                   if (seconds > 0) -                    dsyslog(LOG_INFO, "got EPG info after %d seconds", seconds); +                    dsyslog("got EPG info after %d seconds", seconds);                   return true;                   }                }             }        }        if (seconds == 0) -         dsyslog(LOG_INFO, "waiting for EPG info..."); +         dsyslog("waiting for EPG info...");        sleep(1);        } -  dsyslog(LOG_INFO, "no EPG info available"); +  dsyslog("no EPG info available");    return false;  } @@ -2484,7 +2484,7 @@ void cRecordControl::Stop(bool KeepInstant)       if ((IsInstant() && !KeepInstant) || (timer->IsSingleEvent() && !timer->Matches())) {          // checking timer->Matches() to make sure we don't delete the timer          // if the program was cancelled before the timer's stop time! -        isyslog(LOG_INFO, "deleting timer %d", timer->Index() + 1); +        isyslog("deleting timer %d", timer->Index() + 1);          Timers.Del(timer);          Timers.Save();          } @@ -2523,10 +2523,10 @@ bool cRecordControls::Start(cTimer *Timer)              }          }       else if (!Timer || (Timer->priority >= Setup.PrimaryLimit && !Timer->pending)) -        isyslog(LOG_ERR, "no free DVB device to record channel %d!", ch); +        isyslog("no free DVB device to record channel %d!", ch);       }    else -     esyslog(LOG_ERR, "ERROR: channel %d not defined!", ch); +     esyslog("ERROR: channel %d not defined!", ch);    return false;  } @@ -2546,7 +2546,7 @@ void cRecordControls::Stop(cDvbApi *DvbApi)    for (int i = 0; i < MAXDVBAPI; i++) {        if (RecordControls[i]) {           if (RecordControls[i]->Uses(DvbApi)) { -            isyslog(LOG_INFO, "stopping recording on DVB device %d due to higher priority", DvbApi->CardIndex() + 1); +            isyslog("stopping recording on DVB device %d due to higher priority", DvbApi->CardIndex() + 1);              RecordControls[i]->Stop(true);              }           } @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: osdbase.c 1.1 2002/05/10 14:55:53 kls Exp $ + * $Id: osdbase.c 1.2 2002/05/13 16:30:59 kls Exp $   */  #include "osdbase.h" @@ -49,7 +49,7 @@ int cPalette::Index(eDvbColor Color)              return i;              }           } -     esyslog(LOG_ERR, "ERROR: too many different colors used in palette"); +     esyslog("ERROR: too many different colors used in palette");       full = true;       }    return 0; @@ -105,10 +105,10 @@ cBitmap::cBitmap(int Width, int Height, int Bpp, bool ClearWithBackground)          SetFont(fontOsd);          }       else -        esyslog(LOG_ERR, "ERROR: can't allocate bitmap!"); +        esyslog("ERROR: can't allocate bitmap!");       }    else -     esyslog(LOG_ERR, "ERROR: illegal bitmap parameters (%d, %d)!", width, height); +     esyslog("ERROR: illegal bitmap parameters (%d, %d)!", width, height);  }  cBitmap::~cBitmap() @@ -337,7 +337,7 @@ tWindowHandle cOsd::Create(int x, int y, int w, int h, int Bpp, bool ClearWithBa       if (x >= 0 && y >= 0 && w > 0 && h > 0 && (Bpp == 1 || Bpp == 2 || Bpp == 4 || Bpp == 8)) {          if ((w & 0x03) != 0) {             w += 4 - (w & 0x03); -           esyslog(LOG_ERR, "ERROR: OSD window width must be a multiple of 4 - increasing to %d", w); +           esyslog("ERROR: OSD window width must be a multiple of 4 - increasing to %d", w);             }          cWindow *win = new cWindow(numWindows, x, y, w, h, Bpp, ClearWithBackground, Tiled);          if (OpenWindow(win)) { @@ -349,10 +349,10 @@ tWindowHandle cOsd::Create(int x, int y, int w, int h, int Bpp, bool ClearWithBa             delete win;          }       else -        esyslog(LOG_ERR, "ERROR: illegal OSD parameters"); +        esyslog("ERROR: illegal OSD parameters");       }    else -     esyslog(LOG_ERR, "ERROR: too many OSD windows"); +     esyslog("ERROR: too many OSD windows");    return -1;  } @@ -456,7 +456,7 @@ void cOsd::Relocate(tWindowHandle Window, int x, int y, int NewWidth, int NewHei       if (NewWidth > 0 && NewHeight > 0) {          if ((NewWidth & 0x03) != 0) {             NewWidth += 4 - (NewWidth & 0x03); -           esyslog(LOG_ERR, "ERROR: OSD window width must be a multiple of 4 - increasing to %d", NewWidth); +           esyslog("ERROR: OSD window width must be a multiple of 4 - increasing to %d", NewWidth);             }          CloseWindow(w);          cWindow *NewWindow = new cWindow(w->Handle(), x, y, NewWidth, NewHeight, w->Bpp(), w->ClearWithBackground(), w->Tiled()); @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: plugin.c 1.4 2002/05/13 16:08:22 kls Exp $ + * $Id: plugin.c 1.5 2002/05/13 16:31:09 kls Exp $   */  #include "plugin.h" @@ -139,7 +139,7 @@ static char *SkipQuote(char *s)       strcpy(s, s + 1);       return s;       } -  esyslog(LOG_ERR, "ERROR: missing closing %c", c); +  esyslog("ERROR: missing closing %c", c);    fprintf(stderr, "vdr: missing closing %c\n", c);    return NULL;  } @@ -147,9 +147,9 @@ static char *SkipQuote(char *s)  bool cDll::Load(bool Log)  {    if (Log) -     isyslog(LOG_INFO, "loading plugin: %s", fileName); +     isyslog("loading plugin: %s", fileName);    if (handle) { -     esyslog(LOG_ERR, "attempt to load plugin '%s' twice!", fileName); +     esyslog("attempt to load plugin '%s' twice!", fileName);       return false;       }    handle = dlopen(fileName, RTLD_NOW); @@ -175,7 +175,7 @@ bool cDll::Load(bool Log)                             if (*p)                                p++;                             else { -                              esyslog(LOG_ERR, "ERROR: missing character after \\"); +                              esyslog("ERROR: missing character after \\");                                fprintf(stderr, "vdr: missing character after \\\n");                                return false;                                } @@ -191,7 +191,7 @@ bool cDll::Load(bool Log)                                 if (argc < MAXPLUGINARGS - 1)                                    argv[argc++] = q;                                 else { -                                  esyslog(LOG_ERR, "ERROR: plugin argument list too long"); +                                  esyslog("ERROR: plugin argument list too long");                                    fprintf(stderr, "vdr: plugin argument list too long\n");                                    return false;                                    } @@ -210,7 +210,7 @@ bool cDll::Load(bool Log)          }       }    else { -     esyslog(LOG_ERR, "ERROR: %s", error); +     esyslog("ERROR: %s", error);       fprintf(stderr, "vdr: %s\n", error);       }    return !error && plugin; @@ -299,7 +299,7 @@ bool cPluginManager::StartPlugins(void)        if (p) {           int Language = Setup.OSDLanguage;           Setup.OSDLanguage = 0; // the i18n texts are only available _after_ Start() -         isyslog(LOG_INFO, "starting plugin: %s (%s): %s", p->Name(), p->Version(), p->Description()); +         isyslog("starting plugin: %s (%s): %s", p->Name(), p->Version(), p->Description());           Setup.OSDLanguage = Language;           if (!p->Start())              return false; @@ -354,7 +354,7 @@ void cPluginManager::Shutdown(bool Log)          if (Log) {             cPlugin *p = dll->Plugin();             if (p) -              isyslog(LOG_INFO, "stopping plugin: %s", p->Name()); +              isyslog("stopping plugin: %s", p->Name());             }          dlls.Del(dll);          } diff --git a/recording.c b/recording.c index e6370453..c65aaaf9 100644 --- a/recording.c +++ b/recording.c @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: recording.c 1.61 2002/04/21 14:02:55 kls Exp $ + * $Id: recording.c 1.62 2002/05/13 16:31:21 kls Exp $   */  #include "recording.h" @@ -86,7 +86,7 @@ void AssertFreeDiskSpace(int Priority)          if (!LockFile.Lock())             return;          // Remove the oldest file that has been "deleted": -        isyslog(LOG_INFO, "low disk space while recording, trying to remove a deleted recording..."); +        isyslog("low disk space while recording, trying to remove a deleted recording...");          cRecordings Recordings;          if (Recordings.Load(true)) {             cRecording *r = Recordings.First(); @@ -102,7 +102,7 @@ void AssertFreeDiskSpace(int Priority)                }             }          // No "deleted" files to remove, so let's see if we can delete a recording: -        isyslog(LOG_INFO, "...no deleted recording found, trying to delete an old recording..."); +        isyslog("...no deleted recording found, trying to delete an old recording...");          if (Recordings.Load(false)) {             cRecording *r = Recordings.First();             cRecording *r0 = NULL; @@ -124,7 +124,7 @@ void AssertFreeDiskSpace(int Priority)                return;             }          // Unable to free disk space, but there's nothing we can do about that... -        isyslog(LOG_INFO, "...no old recording found, giving up"); +        isyslog("...no old recording found, giving up");          Interface->Confirm(tr("Low disk space!"), 30);          }       LastFreeDiskCheck = time(NULL); @@ -141,7 +141,7 @@ cResumeFile::cResumeFile(const char *FileName)       strcat(fileName, RESUMEFILESUFFIX);       }    else -     esyslog(LOG_ERR, "ERROR: can't allocate memory for resume file name"); +     esyslog("ERROR: can't allocate memory for resume file name");  }  cResumeFile::~cResumeFile() @@ -368,7 +368,7 @@ cRecording::cRecording(const char *FileName)                if (rbytes >= 0) {                   summary[rbytes] = 0;                   if (rbytes != size) -                    esyslog(LOG_ERR, "%s: expected %d bytes but read %d", SummaryFileName, size, rbytes); +                    esyslog("%s: expected %d bytes but read %d", SummaryFileName, size, rbytes);                   }                else {                   LOG_ERROR_STR(SummaryFileName); @@ -378,7 +378,7 @@ cRecording::cRecording(const char *FileName)                }             else -              esyslog(LOG_ERR, "can't allocate %d byte of memory for summary file '%s'", size + 1, SummaryFileName); +              esyslog("can't allocate %d byte of memory for summary file '%s'", size + 1, SummaryFileName);             close(f);             }          else @@ -556,10 +556,10 @@ bool cRecording::Delete(void)       strncpy(ext, DELEXT, strlen(ext));       if (access(NewName, F_OK) == 0) {          // the new name already exists, so let's remove that one first: -        isyslog(LOG_INFO, "removing recording %s", NewName); +        isyslog("removing recording %s", NewName);          RemoveVideoFile(NewName);          } -     isyslog(LOG_INFO, "deleting recording %s", FileName()); +     isyslog("deleting recording %s", FileName());       result = RenameVideoFile(FileName(), NewName);       }    delete NewName; @@ -570,10 +570,10 @@ bool cRecording::Remove(void)  {    // let's do a final safety check here:    if (!endswith(FileName(), DELEXT)) { -     esyslog(LOG_ERR, "attempt to remove recording %s", FileName()); +     esyslog("attempt to remove recording %s", FileName());       return false;       } -  isyslog(LOG_INFO, "removing recording %s", FileName()); +  isyslog("removing recording %s", FileName());    return RemoveVideoFile(FileName());  } @@ -727,7 +727,7 @@ void cRecordingUserCommand::InvokeCommand(const char *State, const char *Recordi    if (command) {       char *cmd;       asprintf(&cmd, "%s %s \"%s\"", command, State, strescape(RecordingFileName, "\"$")); -     isyslog(LOG_INFO, "executing '%s'", cmd); +     isyslog("executing '%s'", cmd);       SystemExec(cmd);       delete cmd;       } @@ -6,7 +6,7 @@   *   * Ported to LIRC by Carsten Koch <Carsten.Koch@icem.de>  2000-06-16.   * - * $Id: remote.c 1.25 2001/09/30 11:39:49 kls Exp $ + * $Id: remote.c 1.26 2002/05/13 16:31:27 kls Exp $   */  #include "remote.h" @@ -130,7 +130,7 @@ void cRcIoRCU::Action(void)      } buffer;  #pragma pack() -  dsyslog(LOG_INFO, "RCU remote control thread started (pid=%d)", getpid()); +  dsyslog("RCU remote control thread started (pid=%d)", getpid());    int FirstTime = 0;    unsigned int LastCommand = 0; @@ -425,7 +425,7 @@ cRcIoLIRC::~cRcIoLIRC()  void cRcIoLIRC::Action(void)  { -  dsyslog(LOG_INFO, "LIRC remote control thread started (pid=%d)", getpid()); +  dsyslog("LIRC remote control thread started (pid=%d)", getpid());    int FirstTime = 0;    int LastTime = 0; @@ -8,7 +8,7 @@   * the Linux DVB driver's 'tuxplayer' example and were rewritten to suit   * VDR's needs.   * - * $Id: remux.c 1.8 2002/02/03 16:20:37 kls Exp $ + * $Id: remux.c 1.9 2002/05/13 16:31:38 kls Exp $   */  /* The calling interface of the 'cRemux::Process()' function is defined @@ -154,7 +154,7 @@ cTS2PES::cTS2PES(uint8_t *ResultBuffer, int *ResultCount, int Size, uint8_t Audi    audioCid = AudioCid;    if (!(buf = new uint8_t[size])) -     esyslog(LOG_ERR, "Not enough memory for ts_transform"); +     esyslog("Not enough memory for ts_transform");    reset_ipack();  } @@ -172,7 +172,7 @@ void cTS2PES::Clear(void)  void cTS2PES::store(uint8_t *Data, int Count)  {    if (*resultCount + Count > RESULTBUFFERSIZE) { -     esyslog(LOG_ERR, "ERROR: result buffer overflow (%d + %d > %d)", *resultCount, Count, RESULTBUFFERSIZE); +     esyslog("ERROR: result buffer overflow (%d + %d > %d)", *resultCount, Count, RESULTBUFFERSIZE);       Count = RESULTBUFFERSIZE - *resultCount;       }    memcpy(resultBuffer + *resultCount, Data, Count); @@ -309,7 +309,7 @@ void cTS2PES::instant_repack(const uint8_t *Buf, int Count)                       if ((flag1 & 0xC0) == 0x80 )                          mpeg = 2;                       else { -                        esyslog(LOG_INFO, "ERROR: can't record MPEG1!"); +                        esyslog("ERROR: can't record MPEG1!");                          hlength = 0;                          which = 0;                          mpeg = 1; @@ -525,7 +525,7 @@ XXX*/          used++;          }    if (used) -     esyslog(LOG_ERR, "ERROR: skipped %d byte to sync on TS packet", used); +     esyslog("ERROR: skipped %d byte to sync on TS packet", used);    // Convert incoming TS data into multiplexed PES: @@ -570,7 +570,7 @@ XXX*/    if (!synced && skipped >= 0) {       if (skipped > MAXNONUSEFULDATA) { -        esyslog(LOG_ERR, "ERROR: no useful data seen within %d byte of video stream", skipped); +        esyslog("ERROR: no useful data seen within %d byte of video stream", skipped);          skipped = -1;          if (exitOnFailure)             cThread::EmergencyExit(true); @@ -595,7 +595,7 @@ XXX*/                          return NULL; // no useful data found, wait for more                       if (pt != NO_PICTURE) {                          if (pt < I_FRAME || B_FRAME < pt) -                           esyslog(LOG_ERR, "ERROR: unknown picture type '%d'", pt); +                           esyslog("ERROR: unknown picture type '%d'", pt);                          else if (!synced) {                             if (pt == I_FRAME) {                                resultDelivered = i; // will drop everything before this position diff --git a/ringbuffer.c b/ringbuffer.c index 88b515b4..3918297d 100644 --- a/ringbuffer.c +++ b/ringbuffer.c @@ -7,7 +7,7 @@   * Parts of this file were inspired by the 'ringbuffy.c' from the   * LinuxDVB driver (see linuxtv.org).   * - * $Id: ringbuffer.c 1.6 2002/04/19 12:38:44 kls Exp $ + * $Id: ringbuffer.c 1.7 2002/05/13 16:31:46 kls Exp $   */  #include "ringbuffer.h" @@ -52,7 +52,7 @@ cRingBuffer::~cRingBuffer()    delete inputThread;    delete outputThread;    if (statistics) -     dsyslog(LOG_INFO, "buffer stats: %d (%d%%) used", maxFill, maxFill * 100 / (size - 1)); +     dsyslog("buffer stats: %d (%d%%) used", maxFill, maxFill * 100 / (size - 1));  }  void cRingBuffer::WaitForPut(void) @@ -121,11 +121,11 @@ cRingBufferLinear::cRingBufferLinear(int Size, bool Statistics)    if (Size > 1) { // 'Size - 1' must not be 0!       buffer = new uchar[Size];       if (!buffer) -        esyslog(LOG_ERR, "ERROR: can't allocate ring buffer (size=%d)", Size); +        esyslog("ERROR: can't allocate ring buffer (size=%d)", Size);       Clear();       }    else -     esyslog(LOG_ERR, "ERROR: illegal size for ring buffer (%d)", Size); +     esyslog("ERROR: illegal size for ring buffer (%d)", Size);  }  cRingBufferLinear::~cRingBufferLinear() @@ -163,7 +163,7 @@ int cRingBufferLinear::Put(const uchar *Data, int Count)             maxFill = fill;             int percent = maxFill * 100 / (Size() - 1);             if (percent > 75) -              dsyslog(LOG_INFO, "buffer usage: %d%%", percent); +              dsyslog("buffer usage: %d%%", percent);             }          }       if (free > 0) { @@ -228,7 +228,7 @@ cFrame::cFrame(const uchar *Data, int Count, eFrameType Type, int Index)    if (data)       memcpy(data, Data, count);    else -     esyslog(LOG_ERR, "ERROR: can't allocate frame buffer (count=%d)", count); +     esyslog("ERROR: can't allocate frame buffer (count=%d)", count);    next = NULL;  } @@ -314,7 +314,7 @@ void cRingBufferFrame::Drop(const cFrame *Frame)             }          }       else -        esyslog(LOG_ERR, "ERROR: attempt to drop wrong frame from ring buffer!"); +        esyslog("ERROR: attempt to drop wrong frame from ring buffer!");       }    Unlock();    EnablePut(); @@ -10,7 +10,7 @@   * and interact with the Video Disk Recorder - or write a full featured   * graphical interface that sits on top of an SVDRP connection.   * - * $Id: svdrp.c 1.36 2002/05/10 15:05:57 kls Exp $ + * $Id: svdrp.c 1.37 2002/05/13 16:32:05 kls Exp $   */  #include "svdrp.h" @@ -109,7 +109,7 @@ int cSocket::Accept(void)             close(newsock);             newsock = -1;             } -        isyslog(LOG_INFO, "connect from %s, port %hd - %s", inet_ntoa(clientname.sin_addr), ntohs(clientname.sin_port), accepted ? "accepted" : "DENIED"); +        isyslog("connect from %s, port %hd - %s", inet_ntoa(clientname.sin_addr), ntohs(clientname.sin_port), accepted ? "accepted" : "DENIED");          }       else if (errno != EINTR && errno != EAGAIN)          LOG_ERROR; @@ -314,7 +314,7 @@ cSVDRP::cSVDRP(int Port)    numChars = 0;    message = NULL;    lastActivity = 0; -  isyslog(LOG_INFO, "SVDRP listening on port %d", Port); +  isyslog("SVDRP listening on port %d", Port);  }  cSVDRP::~cSVDRP() @@ -330,7 +330,7 @@ void cSVDRP::Close(bool Timeout)       char buffer[BUFSIZ];       gethostname(buffer, sizeof(buffer));       Reply(221, "%s closing connection%s", buffer, Timeout ? " (timeout)" : ""); -     isyslog(LOG_INFO, "closing SVDRP connection"); //TODO store IP#??? +     isyslog("closing SVDRP connection"); //TODO store IP#???       file.Close();       DELETENULL(PUTEhandler);       } @@ -375,7 +375,7 @@ void cSVDRP::Reply(int Code, const char *fmt, ...)          }       else {          Reply(451, "Zero return code - looks like a programming error!"); -        esyslog(LOG_ERR, "SVDRP: zero return code!"); +        esyslog("SVDRP: zero return code!");          }       }  } @@ -473,7 +473,7 @@ void cSVDRP::CmdDELT(const char *Option)             if (!timer->recording) {                Timers.Del(timer);                Timers.Save(); -              isyslog(LOG_INFO, "timer %s deleted", Option); +              isyslog("timer %s deleted", Option);                Reply(250, "Timer \"%s\" deleted", Option);                }             else @@ -738,7 +738,7 @@ void cSVDRP::CmdMESG(const char *Option)    if (*Option) {       delete message;       message = strdup(Option); -     isyslog(LOG_INFO, "SVDRP message: '%s'", message); +     isyslog("SVDRP message: '%s'", message);       Reply(250, "Message stored");       }    else if (message) @@ -763,7 +763,7 @@ void cSVDRP::CmdMODC(const char *Option)                }             *channel = c;             Channels.Save(); -           isyslog(LOG_INFO, "channel %d modified", channel->number); +           isyslog("channel %d modified", channel->number);             Reply(250, "%d %s", channel->number, channel->ToText());             }          else @@ -796,7 +796,7 @@ void cSVDRP::CmdMODT(const char *Option)                }             *timer = t;             Timers.Save(); -           isyslog(LOG_INFO, "timer %d modified (%s)", timer->Index() + 1, timer->active ? "active" : "inactive"); +           isyslog("timer %d modified (%s)", timer->Index() + 1, timer->active ? "active" : "inactive");             Reply(250, "%d %s", timer->Index() + 1, timer->ToText());             }          else @@ -829,7 +829,7 @@ void cSVDRP::CmdNEWC(const char *Option)          Channels.Add(channel);          Channels.ReNumber();          Channels.Save(); -        isyslog(LOG_INFO, "channel %d added", channel->number); +        isyslog("channel %d added", channel->number);          Reply(250, "%d %s", channel->number, channel->ToText());          }       else @@ -848,7 +848,7 @@ void cSVDRP::CmdNEWT(const char *Option)          if (!t) {             Timers.Add(timer);             Timers.Save(); -           isyslog(LOG_INFO, "timer %d added", timer->Index() + 1); +           isyslog("timer %d added", timer->Index() + 1);             Reply(250, "%d %s", timer->Index() + 1, timer->ToText());             return;             } @@ -904,11 +904,11 @@ void cSVDRP::CmdUPDT(const char *Option)             t->Parse(Option);             delete timer;             timer = t; -           isyslog(LOG_INFO, "timer %d updated", timer->Index() + 1); +           isyslog("timer %d updated", timer->Index() + 1);             }          else {             Timers.Add(timer); -           isyslog(LOG_INFO, "timer %d added", timer->Index() + 1); +           isyslog("timer %d added", timer->Index() + 1);             }          Timers.Save();          Reply(250, "%d %s", timer->Index() + 1, timer->ToText()); @@ -1038,18 +1038,18 @@ void cSVDRP::Process(void)                   }                else {                   Reply(501, "Command line too long"); -                 esyslog(LOG_ERR, "SVDRP: command line too long: '%s'", cmdLine); +                 esyslog("SVDRP: command line too long: '%s'", cmdLine);                   numChars = 0;                   }                lastActivity = time(NULL);                }             else if (r <= 0) { -              isyslog(LOG_INFO, "lost connection to SVDRP client"); +              isyslog("lost connection to SVDRP client");                Close();                }             }       if (Setup.SVDRPTimeout && time(NULL) - lastActivity > Setup.SVDRPTimeout) { -        isyslog(LOG_INFO, "timeout on SVDRP connection"); +        isyslog("timeout on SVDRP connection");          Close(true);          }       } @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: thread.c 1.19 2002/03/09 11:51:56 kls Exp $ + * $Id: thread.c 1.20 2002/05/13 16:32:09 kls Exp $   */  #include "thread.h" @@ -153,7 +153,7 @@ void cThread::Cancel(int WaitSeconds)              return;           usleep(10000);           } -     esyslog(LOG_ERR, "ERROR: thread %d won't end (waited %d seconds) - cancelling it...", threadPid, WaitSeconds); +     esyslog("ERROR: thread %d won't end (waited %d seconds) - cancelling it...", threadPid, WaitSeconds);       }    pthread_cancel(thread);  } @@ -175,18 +175,18 @@ void cThread::RaisePanic(void)       }    lastPanic = time(NULL);    if (panicLevel > MAXPANICLEVEL) { -     esyslog(LOG_ERR, "ERROR: max. panic level exceeded"); +     esyslog("ERROR: max. panic level exceeded");       EmergencyExit(true);       }    else -     dsyslog(LOG_INFO, "panic level: %d", panicLevel); +     dsyslog("panic level: %d", panicLevel);  }  bool cThread::EmergencyExit(bool Request)  {    if (!Request)       return emergencyExitRequested; -  esyslog(LOG_ERR, "initiating emergency exit"); +  esyslog("initiating emergency exit");    return emergencyExitRequested = true; // yes, it's an assignment, not a comparison!  } @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: tools.c 1.64 2002/05/12 11:37:24 kls Exp $ + * $Id: tools.c 1.65 2002/05/13 16:32:12 kls Exp $   */  #include "tools.h" @@ -25,7 +25,7 @@ ssize_t safe_read(int filedes, void *buffer, size_t size)    for (;;) {        ssize_t p = read(filedes, buffer, size);        if (p < 0 && errno == EINTR) { -         dsyslog(LOG_INFO, "EINTR while reading from file handle %d - retrying", filedes); +         dsyslog("EINTR while reading from file handle %d - retrying", filedes);           continue;           }        return p; @@ -41,7 +41,7 @@ ssize_t safe_write(int filedes, const void *buffer, size_t size)          p = write(filedes, ptr, size);          if (p < 0) {             if (errno == EINTR) { -              dsyslog(LOG_INFO, "EINTR while writing to file handle %d - retrying", filedes); +              dsyslog("EINTR while writing to file handle %d - retrying", filedes);                continue;                }             break; @@ -77,7 +77,7 @@ char *strcpyrealloc(char *dest, const char *src)       if (dest)          strcpy(dest, src);       else -        esyslog(LOG_ERR, "ERROR: out of memory"); +        esyslog("ERROR: out of memory");       }    else {       delete dest; @@ -269,10 +269,10 @@ bool DirectoryOk(const char *DirName, bool LogErrors)          if (access(DirName, R_OK | W_OK | X_OK) == 0)             return true;          else if (LogErrors) -           esyslog(LOG_ERR, "ERROR: can't access %s", DirName); +           esyslog("ERROR: can't access %s", DirName);          }       else if (LogErrors) -        esyslog(LOG_ERR, "ERROR: %s is not a directory", DirName); +        esyslog("ERROR: %s is not a directory", DirName);       }    else if (LogErrors)       LOG_ERROR_STR(DirName); @@ -291,7 +291,7 @@ bool MakeDirs(const char *FileName, bool IsDirectory)             *p = 0;          struct stat fs;          if (stat(s, &fs) != 0 || !S_ISDIR(fs.st_mode)) { -           dsyslog(LOG_INFO, "creating directory %s", s); +           dsyslog("creating directory %s", s);             if (mkdir(s, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) == -1) {                LOG_ERROR_STR(s);                result = false; @@ -329,15 +329,15 @@ bool RemoveFileOrDir(const char *FileName, bool FollowSymlinks)                            }                         else if (n < size) {                            l[n] = 0; -                          dsyslog(LOG_INFO, "removing %s", l); +                          dsyslog("removing %s", l);                            if (remove(l) < 0)                               LOG_ERROR_STR(l);                            }                         else -                          esyslog(LOG_ERR, "ERROR: symlink name length (%d) exceeded anticipated buffer size (%d)", n, size); +                          esyslog("ERROR: symlink name length (%d) exceeded anticipated buffer size (%d)", n, size);                         delete l;                         } -                    dsyslog(LOG_INFO, "removing %s", buffer); +                    dsyslog("removing %s", buffer);                      if (remove(buffer) < 0)                         LOG_ERROR_STR(buffer);                      delete buffer; @@ -350,7 +350,7 @@ bool RemoveFileOrDir(const char *FileName, bool FollowSymlinks)             return false;             }          } -     dsyslog(LOG_INFO, "removing %s", FileName); +     dsyslog("removing %s", FileName);       if (remove(FileName) < 0) {          LOG_ERROR_STR(FileName);          return false; @@ -392,7 +392,7 @@ bool RemoveEmptyDirectories(const char *DirName, bool RemoveThis)             }       closedir(d);       if (RemoveThis && empty) { -        dsyslog(LOG_INFO, "removing %s", DirName); +        dsyslog("removing %s", DirName);          if (remove(DirName) < 0) {             LOG_ERROR_STR(DirName);             return false; @@ -421,7 +421,7 @@ char *ReadLink(const char *FileName)       TargetName = RealName;       }    else -     esyslog(LOG_ERR, "ERROR: symlink's target name too long: %s", FileName); +     esyslog("ERROR: symlink's target name too long: %s", FileName);    return TargetName ? strdup(TargetName) : NULL;  } @@ -446,14 +446,14 @@ bool SpinUpDisk(const char *FileName)              gettimeofday(&tp2, NULL);              double seconds = (((long long)tp2.tv_sec * 1000000 + tp2.tv_usec) - ((long long)tp1.tv_sec * 1000000 + tp1.tv_usec)) / 1000000.0;              if (seconds > 0.5) -               dsyslog(LOG_INFO, "SpinUpDisk took %.2f seconds\n", seconds); +               dsyslog("SpinUpDisk took %.2f seconds\n", seconds);              return true;              }           else              LOG_ERROR_STR(buf);           }        } -  esyslog(LOG_ERR, "ERROR: SpinUpDisk failed"); +  esyslog("ERROR: SpinUpDisk failed");    return false;  } @@ -501,7 +501,7 @@ bool cFile::Open(const char *FileName, int Flags, mode_t Mode)  {    if (!IsOpen())       return Open(open(FileName, Flags, Mode)); -  esyslog(LOG_ERR, "ERROR: attempt to re-open %s", FileName); +  esyslog("ERROR: attempt to re-open %s", FileName);    return false;  } @@ -517,15 +517,15 @@ bool cFile::Open(int FileDes)                if (!files[f])                   files[f] = true;                else -                 esyslog(LOG_ERR, "ERROR: file descriptor %d already in files[]", f); +                 esyslog("ERROR: file descriptor %d already in files[]", f);                return true;                }             else -              esyslog(LOG_ERR, "ERROR: file descriptor %d is larger than FD_SETSIZE (%d)", f, FD_SETSIZE); +              esyslog("ERROR: file descriptor %d is larger than FD_SETSIZE (%d)", f, FD_SETSIZE);             }          }       else -        esyslog(LOG_ERR, "ERROR: attempt to re-open file descriptor %d", FileDes); +        esyslog("ERROR: attempt to re-open file descriptor %d", FileDes);       }    return false;  } @@ -671,7 +671,7 @@ bool cLockFile::Lock(int WaitSeconds)                struct stat fs;                if (stat(fileName, &fs) == 0) {                   if (time(NULL) - fs.st_mtime > LOCKFILESTALETIME) { -                    esyslog(LOG_ERR, "ERROR: removing stale lock file '%s'", fileName); +                    esyslog("ERROR: removing stale lock file '%s'", fileName);                      if (remove(fileName) < 0) {                         LOG_ERROR_STR(fileName);                         break; @@ -704,7 +704,7 @@ void cLockFile::Unlock(void)       f = -1;       }    else -     esyslog(LOG_ERR, "ERROR: attempt to unlock %s without holding a lock!", fileName); +     esyslog("ERROR: attempt to unlock %s without holding a lock!", fileName);  }  // --- cListObject ----------------------------------------------------------- @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: tools.h 1.44 2002/05/12 11:14:18 kls Exp $ + * $Id: tools.h 1.45 2002/05/13 16:21:55 kls Exp $   */  #ifndef __TOOLS_H @@ -20,12 +20,12 @@  extern int SysLogLevel; -#define esyslog(a...) void( (SysLogLevel > 0) ? syslog(a) : void() ) -#define isyslog(a...) void( (SysLogLevel > 1) ? syslog(a) : void() ) -#define dsyslog(a...) void( (SysLogLevel > 2) ? syslog(a) : void() ) +#define esyslog(a...) void( (SysLogLevel > 0) ? syslog(LOG_ERR,   a) : void() ) +#define isyslog(a...) void( (SysLogLevel > 1) ? syslog(LOG_INFO,  a) : void() ) +#define dsyslog(a...) void( (SysLogLevel > 2) ? syslog(LOG_DEBUG, a) : void() ) -#define LOG_ERROR         esyslog(LOG_ERR, "ERROR (%s,%d): %m", __FILE__, __LINE__) -#define LOG_ERROR_STR(s)  esyslog(LOG_ERR, "ERROR: %s: %m", s) +#define LOG_ERROR         esyslog("ERROR (%s,%d): %m", __FILE__, __LINE__) +#define LOG_ERROR_STR(s)  esyslog("ERROR: %s: %m", s)  #define SECSINDAY  86400 @@ -22,7 +22,7 @@   *   * The project's page is at http://www.cadsoft.de/people/kls/vdr   * - * $Id: vdr.c 1.108 2002/05/13 16:09:06 kls Exp $ + * $Id: vdr.c 1.109 2002/05/13 16:32:49 kls Exp $   */  #include <getopt.h> @@ -66,7 +66,7 @@ static void Watchdog(int signum)  {    // Something terrible must have happened that prevented the 'alarm()' from    // being called in time, so let's get out of here: -  esyslog(LOG_ERR, "PANIC: watchdog timer expired - exiting!"); +  esyslog("PANIC: watchdog timer expired - exiting!");    exit(1);  } @@ -269,7 +269,7 @@ int main(int argc, char *argv[])       pid_t pid = fork();       if (pid < 0) {          fprintf(stderr, "%m\n"); -        esyslog(LOG_ERR, "ERROR: %m"); +        esyslog("ERROR: %m");          return 2;          }       if (pid != 0) @@ -289,7 +289,7 @@ int main(int argc, char *argv[])       stderr = freopen(Terminal, "w", stderr);       } -  isyslog(LOG_INFO, "VDR version %s started", VDRVERSION); +  isyslog("VDR version %s started", VDRVERSION);    // Load plugins: @@ -367,14 +367,14 @@ int main(int argc, char *argv[])    bool ForceShutdown = false;    if (WatchdogTimeout > 0) { -     dsyslog(LOG_INFO, "setting watchdog timer to %d seconds", WatchdogTimeout); +     dsyslog("setting watchdog timer to %d seconds", WatchdogTimeout);       alarm(WatchdogTimeout); // Initial watchdog timer start       }    while (!Interrupted) {          // Handle emergency exits:          if (cThread::EmergencyExit()) { -           esyslog(LOG_ERR, "emergency exit requested - shutting down"); +           esyslog("emergency exit requested - shutting down");             break;             }          // Restart the Watchdog timer: @@ -382,7 +382,7 @@ int main(int argc, char *argv[])             int LatencyTime = WatchdogTimeout - alarm(WatchdogTimeout);             if (LatencyTime > MaxLatencyTime) {                MaxLatencyTime = LatencyTime; -              dsyslog(LOG_INFO, "max. latency time %d seconds", MaxLatencyTime); +              dsyslog("max. latency time %d seconds", MaxLatencyTime);                }             }          // Channel display: @@ -429,7 +429,7 @@ int main(int argc, char *argv[])                 cDisplayVolume::Process(key);                 break;            // Power off: -          case kPower: isyslog(LOG_INFO, "Power button pressed"); +          case kPower: isyslog("Power button pressed");                         DELETENULL(*Interact);                         if (!Shutdown) {                            Interface->Error(tr("Can't shutdown - option '-s' not given!")); @@ -535,7 +535,7 @@ int main(int argc, char *argv[])                   if (!LastActivity) {                      if (!timer || Delta > MANUALSTART) {                         // Apparently the user started VDR manually -                       dsyslog(LOG_INFO, "assuming manual start of VDR"); +                       dsyslog("assuming manual start of VDR");                         LastActivity = Now;                         continue; // don't run into the actual shutdown procedure below                         } @@ -553,7 +553,7 @@ int main(int argc, char *argv[])                   if (!Next || Delta > Setup.MinEventTimeout * 60 || ForceShutdown) {                      ForceShutdown = false;                      if (timer) -                       dsyslog(LOG_INFO, "next timer event at %s", ctime(&Next)); +                       dsyslog("next timer event at %s", ctime(&Next));                      if (WatchdogTimeout > 0)                         signal(SIGALRM, SIG_IGN);                      if (Interface->Confirm(tr("Press any key to cancel shutdown"), UserShutdown ? 5 : SHUTDOWNWAIT, true)) { @@ -561,7 +561,7 @@ int main(int argc, char *argv[])                         const char *File = timer ? timer->file : "";                         char *cmd;                         asprintf(&cmd, "%s %ld %ld %d \"%s\" %d", Shutdown, Next, Delta, Channel, strescape(File, "\"$"), UserShutdown); -                       isyslog(LOG_INFO, "executing '%s'", cmd); +                       isyslog("executing '%s'", cmd);                         SystemExec(cmd);                         delete cmd;                         } @@ -582,7 +582,7 @@ int main(int argc, char *argv[])             }          }    if (Interrupted) -     isyslog(LOG_INFO, "caught signal %d", Interrupted); +     isyslog("caught signal %d", Interrupted);    cVideoCutter::Stop();    delete Menu;    delete ReplayControl; @@ -593,12 +593,12 @@ int main(int argc, char *argv[])    Setup.Save();    cDvbApi::Cleanup();    if (WatchdogTimeout > 0) -     dsyslog(LOG_INFO, "max. latency time %d seconds", MaxLatencyTime); -  isyslog(LOG_INFO, "exiting"); +     dsyslog("max. latency time %d seconds", MaxLatencyTime); +  isyslog("exiting");    if (SysLogLevel > 0)       closelog();    if (cThread::EmergencyExit()) { -     esyslog(LOG_ERR, "emergency exit!"); +     esyslog("emergency exit!");       return 1;       }    return 0; @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: videodir.c 1.7 2002/01/27 12:37:26 kls Exp $ + * $Id: videodir.c 1.8 2002/05/13 16:32:52 kls Exp $   */  #include "videodir.h" @@ -108,7 +108,7 @@ int OpenVideoFile(const char *FileName, int Flags)    // Incoming name must be in base video directory:    if (strstr(FileName, VideoDirectory) != FileName) { -     esyslog(LOG_ERR, "ERROR: %s not in %s", FileName, VideoDirectory); +     esyslog("ERROR: %s not in %s", FileName, VideoDirectory);       errno = ENOENT; // must set 'errno' - any ideas for a better value?       return -1;       } | 
