mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
timerd: remove unnecessary workarounds when saving events to file
Origin commit data
------------------
Branch: ni/coolstream
Commit: c11e75846b
Author: Christian Schuett <Gaucho316@hotmail.com>
Date: 2015-03-16 (Mon, 16 Mar 2015)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
committed by
vanhofen
parent
0a223d9c56
commit
743c7beae7
@@ -438,8 +438,7 @@ void CTimerManager::loadEventsFromConfig()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::vector<int> savedIDs;
|
std::vector<int> savedIDs = config.getInt32Vector("IDS");
|
||||||
savedIDs = config.getInt32Vector ("IDS");
|
|
||||||
dprintf("%d timer(s) in config\n", (int)savedIDs.size());
|
dprintf("%d timer(s) in config\n", (int)savedIDs.size());
|
||||||
for(unsigned int i=0; i < savedIDs.size(); i++)
|
for(unsigned int i=0; i < savedIDs.size(); i++)
|
||||||
{
|
{
|
||||||
@@ -1019,19 +1018,11 @@ void CTimerEvent::printEvent(void)
|
|||||||
void CTimerEvent::saveToConfig(CConfigFile *config)
|
void CTimerEvent::saveToConfig(CConfigFile *config)
|
||||||
{
|
{
|
||||||
dprintf("CTimerEvent::saveToConfig\n");
|
dprintf("CTimerEvent::saveToConfig\n");
|
||||||
std::vector<int> allIDs;
|
std::vector<int> allIDs = config->getInt32Vector("IDS");
|
||||||
allIDs.clear();
|
|
||||||
if (!(config->getString("IDS").empty()))
|
|
||||||
{
|
|
||||||
// sonst bekommen wir den bloeden 0er
|
|
||||||
allIDs=config->getInt32Vector("IDS");
|
|
||||||
}
|
|
||||||
|
|
||||||
allIDs.push_back(eventID);
|
allIDs.push_back(eventID);
|
||||||
dprintf("adding %d to IDS\n",eventID);
|
dprintf("adding %d to IDS\n", eventID);
|
||||||
//SetInt-Vector haengt komischerweise nur an, deswegen erst loeschen
|
config->setInt32Vector("IDS", allIDs);
|
||||||
config->setString("IDS","");
|
|
||||||
config->setInt32Vector ("IDS",allIDs);
|
|
||||||
|
|
||||||
std::stringstream ostr;
|
std::stringstream ostr;
|
||||||
ostr << eventID;
|
ostr << eventID;
|
||||||
|
Reference in New Issue
Block a user