diff options
author | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2008-02-20 17:47:50 +0100 |
---|---|---|
committer | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2008-02-20 17:47:50 +0100 |
commit | 1ca3263b1febbef86071eaaa4e8eda0bbac578fa (patch) | |
tree | 51acae08ac515eba84e01c76261a7735665dd601 /switchtimer_thread.c | |
parent | 57d0cbd75c591e450e4d11a45ac6a016de48b8cf (diff) | |
download | vdr-plugin-epgsearch-1ca3263b1febbef86071eaaa4e8eda0bbac578fa.tar.gz vdr-plugin-epgsearch-1ca3263b1febbef86071eaaa4e8eda0bbac578fa.tar.bz2 |
replaced asprintf with cString::sprintf and a wrapper function
Diffstat (limited to 'switchtimer_thread.c')
-rw-r--r-- | switchtimer_thread.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/switchtimer_thread.c b/switchtimer_thread.c index f8e10d8..3a48705 100644 --- a/switchtimer_thread.c +++ b/switchtimer_thread.c @@ -95,18 +95,15 @@ void cSwitchTimerThread::Action(void) if (doswitch) { LogFile.Log(1,"switching to channel %d", channel->Number()); - char* cmd = NULL; - asprintf(&cmd, "CHAN %d", channel->Number()); + cString cmd = cString::sprintf("CHAN %d", channel->Number()); SendViaSVDRP(cmd); - free(cmd); if (switchTimer->unmute && cDevice::PrimaryDevice()->IsMute()) cDevice::PrimaryDevice()->ToggleMute(); } - char* Message = NULL; - asprintf(&Message, "%s: %s - %s", event->Title(), CHANNELNAME(channel), GETTIMESTRING(event)); + cString Message = cString::sprintf("%s: %s - %s", event->Title(), + CHANNELNAME(channel), GETTIMESTRING(event)); SendMsg(Message); - free(Message); sleepSec(MSG_DELAY); } SwitchTimers.Save(); |