mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
setting_helpers: fix flagfile handling in CFlagFileNotifier()
Origin commit data
------------------
Branch: ni/coolstream
Commit: 57bdeba636
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-09-16 (Sat, 16 Sep 2017)
Origin message was:
------------------
- setting_helpers: fix flagfile handling in CFlagFileNotifier()
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -140,13 +140,14 @@ bool CTouchFileNotifier::changeNotify(const neutrino_locale_t, void * data)
|
||||
bool CFlagFileNotifier::changeNotify(const neutrino_locale_t, void * data)
|
||||
{
|
||||
std::ostringstream buf;
|
||||
buf.str("");
|
||||
buf << FLAGDIR << "/." << filename;
|
||||
|
||||
const char *flagfile = buf.str().c_str();
|
||||
std::string flagfile = buf.str();
|
||||
|
||||
if ((*(int *)data) != 0)
|
||||
{
|
||||
FILE * fd = fopen(flagfile, "w");
|
||||
FILE * fd = fopen(flagfile.c_str(), "w");
|
||||
if (fd)
|
||||
{
|
||||
fclose(fd);
|
||||
@@ -243,7 +244,7 @@ bool CFlagFileNotifier::changeNotify(const neutrino_locale_t, void * data)
|
||||
if (my_system(3, "service", filename, "stop") != 0)
|
||||
printf("[CFlagFileNotifier] executing failed\n");
|
||||
}
|
||||
remove(flagfile);
|
||||
remove(flagfile.c_str());
|
||||
}
|
||||
return menu_return::RETURN_REPAINT;
|
||||
}
|
||||
|
Reference in New Issue
Block a user