summaryrefslogtreecommitdiff
path: root/conflictcheck_thread.c
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2008-02-20 17:47:50 +0100
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2008-02-20 17:47:50 +0100
commit1ca3263b1febbef86071eaaa4e8eda0bbac578fa (patch)
tree51acae08ac515eba84e01c76261a7735665dd601 /conflictcheck_thread.c
parent57d0cbd75c591e450e4d11a45ac6a016de48b8cf (diff)
downloadvdr-plugin-epgsearch-1ca3263b1febbef86071eaaa4e8eda0bbac578fa.tar.gz
vdr-plugin-epgsearch-1ca3263b1febbef86071eaaa4e8eda0bbac578fa.tar.bz2
replaced asprintf with cString::sprintf and a wrapper function
Diffstat (limited to 'conflictcheck_thread.c')
-rw-r--r--conflictcheck_thread.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/conflictcheck_thread.c b/conflictcheck_thread.c
index 7a7fabf..b9e4742 100644
--- a/conflictcheck_thread.c
+++ b/conflictcheck_thread.c
@@ -110,23 +110,22 @@ void cConflictCheckThread::Action(void)
time_t nextConflict = 0;
if (conflictCheck.relevantConflicts > 0)
{
- char* msgfmt = NULL;
- asprintf(&msgfmt, tr("%d timer conflict(s)! First at %s. Show them?"), conflictCheck.relevantConflicts,
- *DateTime(conflictCheck.nextRelevantConflictDate));
- bool doMessage = EPGSearchConfig.noConflMsgWhileReplay == 0 ||
- !cDevice::PrimaryDevice()->Replaying() ||
- conflictCheck.nextRelevantConflictDate - now < 2*60*60;
- if (doMessage && SendMsg(msgfmt, true,7) == kOk)
+ cString msgfmt = cString::sprintf(tr("%d timer conflict(s)! First at %s. Show them?"),
+ conflictCheck.relevantConflicts,
+ *DateTime(conflictCheck.nextRelevantConflictDate));
+ bool doMessage = EPGSearchConfig.noConflMsgWhileReplay == 0 ||
+ !cDevice::PrimaryDevice()->Replaying() ||
+ conflictCheck.nextRelevantConflictDate - now < 2*60*60;
+ if (doMessage && SendMsg(msgfmt, true,7) == kOk)
{
- m_plugin->showConflicts = true;
- cRemote::CallPlugin("epgsearch");
+ m_plugin->showConflicts = true;
+ cRemote::CallPlugin("epgsearch");
}
- free(msgfmt);
-
- if (EPGSearchConfig.sendMailOnConflicts)
+
+ if (EPGSearchConfig.sendMailOnConflicts)
{
- cMailConflictNotifier mailNotifier;
- mailNotifier.SendConflictNotifications(conflictCheck);
+ cMailConflictNotifier mailNotifier;
+ mailNotifier.SendConflictNotifications(conflictCheck);
}
}