diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2007-06-23 18:00:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2007-06-23 18:00:00 +0200 |
commit | a9c7f0de90a44ea7c031154d47b092faed74f90b (patch) | |
tree | e361dd22d05e8435de69b6aee64efe1aa816a2bc /svdrp.c | |
parent | b1e4da3be6552f58f3890bf2ad48879823d2e130 (diff) | |
download | vdr-patch-lnbsharing-a9c7f0de90a44ea7c031154d47b092faed74f90b.tar.gz vdr-patch-lnbsharing-a9c7f0de90a44ea7c031154d47b092faed74f90b.tar.bz2 |
Version 1.5.5vdr-1.5.5
- Fixed a name clash between skincurses.c and the new cOsd position functions.
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
- Changed the parameter "OSD font size" to "Default font size" in "Setup/OSD".
- Fixed handling address masks in SVDRP host settings (thanks to Frank Schmirler).
- Fonts can now be created with a width that overwrites the default width (thanks
to Andreas Mair).
- Added full weekday names to i18n.c for plugins to use (thanks to Patrice Staudt).
The new function WeekDayNameFull() can be used to get these names from integer
values (just like the abbreviated weekday names).
- Fixed stripping i18n stuff from font names (reported by Anssi Hannula).
- Improved performance of the SVDRP commands LSTC and CHAN when used with a
channel name.
Diffstat (limited to 'svdrp.c')
-rw-r--r-- | svdrp.c | 56 |
1 files changed, 22 insertions, 34 deletions
@@ -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.101 2007/04/30 12:41:07 kls Exp $ + * $Id: svdrp.c 1.102 2007/06/23 13:14:59 kls Exp $ */ #include "svdrp.h" @@ -497,14 +497,14 @@ void cSVDRP::CmdCHAN(const char *Option) if (channel) n = channel->Number(); else { - int i = 1; - while ((channel = Channels.GetByNumber(i, 1)) != NULL) { - if (strcasecmp(channel->Name(), Option) == 0) { - n = channel->Number(); - break; - } - i = channel->Number() + 1; - } + for (cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) { + if (!channel->GroupSep()) { + if (strcasecmp(channel->Name(), Option) == 0) { + n = channel->Number(); + break; + } + } + } } } if (n < 0) { @@ -871,23 +871,16 @@ void cSVDRP::CmdLSTC(const char *Option) Reply(501, "Channel \"%s\" not defined", Option); } else { - int i = 1; cChannel *next = NULL; - while (i <= Channels.MaxNumber()) { - cChannel *channel = Channels.GetByNumber(i, 1); - if (channel) { - if (strcasestr(channel->Name(), Option)) { - if (next) - Reply(-250, "%d %s", next->Number(), *next->ToText()); - next = channel; - } - } - else { - Reply(501, "Channel \"%d\" not found", i); - return; - } - i = channel->Number() + 1; - } + for (cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) { + if (!channel->GroupSep()) { + if (strcasestr(channel->Name(), Option)) { + if (next) + Reply(-250, "%d %s", next->Number(), *next->ToText()); + next = channel; + } + } + } if (next) Reply(250, "%d %s", next->Number(), *next->ToText()); else @@ -895,15 +888,10 @@ void cSVDRP::CmdLSTC(const char *Option) } } else if (Channels.MaxNumber() >= 1) { - int i = 1; - while (i <= Channels.MaxNumber()) { - cChannel *channel = Channels.GetByNumber(i, 1); - if (channel) - Reply(channel->Number() < Channels.MaxNumber() ? -250 : 250, "%d %s", channel->Number(), *channel->ToText()); - else - Reply(501, "Channel \"%d\" not found", i); - i = channel->Number() + 1; - } + for (cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) { + if (!channel->GroupSep()) + Reply(channel->Number() < Channels.MaxNumber() ? -250 : 250, "%d %s", channel->Number(), *channel->ToText()); + } } else Reply(550, "No channels defined"); |