From 44a2bd767843f018fb73f8a9f09d57f27a39230b Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 26 Oct 2012 23:16:30 +0200 Subject: [PATCH 01/11] src/system/helpers.cpp: fix resource leak ,use new instead of malloc Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/a03445fe401606f34e7db5d5aab21f5cc9e5cfac Author: Jacek Jendrzej Date: 2012-10-26 (Fri, 26 Oct 2012) --- src/system/helpers.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp index d68dcf67a..c993bbf41 100644 --- a/src/system/helpers.cpp +++ b/src/system/helpers.cpp @@ -246,14 +246,14 @@ std::string trim(std::string &str, const std::string &trimChars /*= " \n\r\t"*/) CFileHelpers::CFileHelpers() { FileBufSize = 0xFFFF; - FileBuf = (char*)malloc(FileBufSize); + FileBuf = new char[FileBufSize]; doCopyFlag = true; } CFileHelpers::~CFileHelpers() { if (FileBuf != NULL) - free(FileBuf); + delete [] FileBuf; } CFileHelpers* CFileHelpers::getInstance() @@ -271,7 +271,7 @@ bool CFileHelpers::copyFile(const char *Src, const char *Dst, mode_t mode) if ((fd1 = open(Src, O_RDONLY)) < 0) return false; if ((fd2 = open(Dst, O_WRONLY | O_CREAT)) < 0) { - close(fd2); + close(fd1); return false; } @@ -294,8 +294,11 @@ bool CFileHelpers::copyFile(const char *Src, const char *Dst, mode_t mode) if (doCopyFlag) { lseek64(fd2, 0, SEEK_SET); off64_t fsizeDst64 = lseek64(fd2, 0, SEEK_END); - if (fsizeSrc64 != fsizeDst64) + if (fsizeSrc64 != fsizeDst64){ + close(fd1); + close(fd2); return false; + } } } else { // < 2GB @@ -316,8 +319,11 @@ bool CFileHelpers::copyFile(const char *Src, const char *Dst, mode_t mode) if (doCopyFlag) { lseek(fd2, 0, SEEK_SET); long fsizeDst = lseek(fd2, 0, SEEK_END); - if (fsizeSrc != fsizeDst) + if (fsizeSrc != fsizeDst){ + close(fd1); + close(fd2); return false; + } } } close(fd1); From 2e92df3ea10d2ab142d7a91d76c53c43f00e3861 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sat, 27 Oct 2012 20:00:35 +0200 Subject: [PATCH 02/11] src/gui/bouquetlist.cpp: fix width Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/cc73e4de8644a463d12781b8e62077f4126e8833 Author: Jacek Jendrzej Date: 2012-10-27 (Sat, 27 Oct 2012) --- src/gui/bouquetlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index f1e11d97b..8395499ab 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -337,7 +337,7 @@ int CBouquetList::show(bool bShowChannelList) CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, ""); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight(); - width = w_max (need_width, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getWidth()*52);//500 + width = w_max (need_width, 20);//500 height = h_max (16 * fheight, 40); /* assuming all color icons must have same size */ From 403addaca255aa5a5df556c360583b2f56e7a96d Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sun, 28 Oct 2012 13:08:55 +0100 Subject: [PATCH 03/11] src/gui/imageinfo.cpp: change SVN Version to GIT Version Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/2ee2bb63f053e493c55edafef010e6eb4e8d4bd1 Author: Jacek Jendrzej Date: 2012-10-28 (Sun, 28 Oct 2012) --- src/gui/Makefile.am | 21 +++++++++++++-------- src/gui/imageinfo.cpp | 16 ++++++++-------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index 888d93806..be5bcbad4 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -1,16 +1,21 @@ AM_CPPFLAGS = -fno-rtti -fno-exceptions #AM_CPPFLAGS = -fno-rtti - -BUILT_SOURCES = svn_version.h - -svn_version.h: - @if test -d .svn ; then \ - sleep 180 && rm svn_version.h & echo "#define SVNVERSION \"$$(svnversion -n || echo svn_oops!)\" " > svn_version.h ; \ +.PHONY:git_version.h +BUILT_SOURCES = git_version.h +git_version.h: + @if test -d ../../.git; then \ + echo "#define GITVERSION \"$$(git describe --dirty || echo '#define BUILT_DATE "'`date`'"' )\" " > git_version.h.tmp ; \ + if diff -q git_version.h git_version.h.tmp >/dev/null 2>&1 ; then \ + rm -f git_version.h.tmp ; \ + else \ + rm -f git_version.h ; \ + mv git_version.h.tmp git_version.h ; \ + fi; \ else \ - rm svn_version.h; echo '#define BUILT_DATE "'`date`'"' > svn_version.h ; \ + rm git_version.h; echo '#define BUILT_DATE "'`date`'"' > git_version.h ; \ fi -noinst_HEADERS = svn_version.h +noinst_HEADERS = git_version.h SUBDIRS = widget bedit diff --git a/src/gui/imageinfo.cpp b/src/gui/imageinfo.cpp index ac5ecfa27..9748d3f57 100644 --- a/src/gui/imageinfo.cpp +++ b/src/gui/imageinfo.cpp @@ -39,8 +39,8 @@ #include #include -#include "svn_version.h" -#define SVN_REV "SVN Rev.:" +#include "git_version.h" +#define GIT_DESC "GIT Desc.:" #define GIT_REV "GIT Build:" extern cVideo * videoDecoder; @@ -92,8 +92,8 @@ void CImageInfo::Init(void) offset = tmpoffset; } } -#ifdef SVNVERSION - int off_tmp = g_Font[font_info]->getRenderWidth(SVN_REV); +#ifdef GITVERSION + int off_tmp = g_Font[font_info]->getRenderWidth(GIT_DESC); #else int off_tmp = g_Font[font_info]->getRenderWidth(GIT_REV); #endif @@ -206,8 +206,8 @@ void CImageInfo::paint() const char * version = config.getString("version", "no version").c_str(); const char * docs = config.getString("docs", "http://wiki.neutrino-hd.de").c_str(); const char * forum = config.getString("forum", "http://forum.tuxbox.org").c_str(); -#ifdef SVNVERSION - const char * builddate = config.getString("builddate", SVNVERSION).c_str(); +#ifdef GITVERSION + const char * builddate = GITVERSION; #else const char * builddate = config.getString("builddate", BUILT_DATE).c_str(); #endif @@ -244,8 +244,8 @@ void CImageInfo::paint() paintLine(xpos+offset, font_info, Version_Kernel.c_str()); ypos += iheight; -#ifdef SVNVERSION - paintLine(xpos , font_info, SVN_REV); +#ifdef GITVERSION + paintLine(xpos , font_info, GIT_DESC); #else paintLine(xpos , font_info, GIT_REV); #endif From 79dc9edb00752a6a389444b0a6fb2c92b153adad Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sun, 28 Oct 2012 13:40:27 +0100 Subject: [PATCH 04/11] fix c/p , supplement to 403addaca255aa5a5df556c360583b2f56e7a96d Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/a5a807d63fd65881f9d32f33e2fc4ad510ef9bd5 Author: Jacek Jendrzej Date: 2012-10-28 (Sun, 28 Oct 2012) Origin message was: ------------------ -fix c/p , supplement to 403addaca255aa5a5df556c360583b2f56e7a96d --- src/gui/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index be5bcbad4..33d43d6e1 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -4,7 +4,7 @@ AM_CPPFLAGS = -fno-rtti -fno-exceptions BUILT_SOURCES = git_version.h git_version.h: @if test -d ../../.git; then \ - echo "#define GITVERSION \"$$(git describe --dirty || echo '#define BUILT_DATE "'`date`'"' )\" " > git_version.h.tmp ; \ + echo "#define GITVERSION \"$$(git describe --dirty || echo `date` )\" " > git_version.h.tmp ; \ if diff -q git_version.h git_version.h.tmp >/dev/null 2>&1 ; then \ rm -f git_version.h.tmp ; \ else \ From a69df5f302482de04c161d46b151ed2ceb1533d2 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sun, 28 Oct 2012 14:17:36 +0100 Subject: [PATCH 05/11] dont phony git_version.h only makeversion, supplement to 403addaca255aa5a5df556c360583b2f56e7a96d Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/df3b9e4f73554f8ed01a1633874c94e0089588d9 Author: Jacek Jendrzej Date: 2012-10-28 (Sun, 28 Oct 2012) --- src/gui/Makefile.am | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index 33d43d6e1..39c5967a5 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -1,8 +1,7 @@ AM_CPPFLAGS = -fno-rtti -fno-exceptions #AM_CPPFLAGS = -fno-rtti -.PHONY:git_version.h BUILT_SOURCES = git_version.h -git_version.h: +git_version.h: makeversion @if test -d ../../.git; then \ echo "#define GITVERSION \"$$(git describe --dirty || echo `date` )\" " > git_version.h.tmp ; \ if diff -q git_version.h git_version.h.tmp >/dev/null 2>&1 ; then \ @@ -14,9 +13,11 @@ git_version.h: else \ rm git_version.h; echo '#define BUILT_DATE "'`date`'"' > git_version.h ; \ fi - noinst_HEADERS = git_version.h +.PHONY: makeversion + + SUBDIRS = widget bedit INCLUDES = \ From 9c9febce5745c0284190f08c8fed7dcae55cb1b8 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sun, 28 Oct 2012 20:05:42 +0100 Subject: [PATCH 06/11] neutrino: show epg infos on announce recording, ported from tuxcvs Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/654ca3656d330f4c0736b008e8182d50ada5666a Author: Jacek Jendrzej Date: 2012-10-28 (Sun, 28 Oct 2012) --- src/driver/rcinput.cpp | 3 +- src/neutrino.cpp | 82 ++++++++++++++++++++---------------------- src/neutrino.h | 1 + 3 files changed, 42 insertions(+), 44 deletions(-) diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 30f970f71..3ecf6e7ef 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -1085,7 +1085,8 @@ printf("[neutrino] CSectionsdClient::EVT_GOT_CN_EPG\n"); break; case CTimerdClient::EVT_ANNOUNCE_ZAPTO : *msg = NeutrinoMessages::ANNOUNCE_ZAPTO; - *data = 0; + *data = (neutrino_msg_data_t)p; + dont_delete_p = true; break; case CTimerdClient::EVT_ANNOUNCE_SHUTDOWN : *msg = NeutrinoMessages::ANNOUNCE_SHUTDOWN; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index c5fe6c736..406d2fa8a 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2630,8 +2630,7 @@ _repeat: return res; } else if( msg == NeutrinoMessages::ZAPTO) { - CTimerd::EventInfo * eventinfo; - eventinfo = (CTimerd::EventInfo *) data; + CTimerd::EventInfo * eventinfo = (CTimerd::EventInfo *) data; if(recordingstatus==0) { bool isTVMode = CServiceManager::getInstance()->IsChannelTVChannel(eventinfo->channel_id); @@ -2653,52 +2652,19 @@ _repeat: standbyMode( false ); } if( mode != mode_scart ) { + CTimerd::RecordingInfo * eventinfo = (CTimerd::RecordingInfo *) data; std::string name = g_Locale->getText(LOCALE_ZAPTOTIMER_ANNOUNCE); - - CTimerd::TimerList tmpTimerList; - CTimerdClient tmpTimerdClient; - - tmpTimerList.clear(); - tmpTimerdClient.getTimerList( tmpTimerList ); - - if( !tmpTimerList.empty() ) { - sort( tmpTimerList.begin(), tmpTimerList.end() ); - - CTimerd::responseGetTimer &timer = tmpTimerList[0]; - - name += "\n"; - - std::string zAddData = CServiceManager::getInstance()->GetServiceName(timer.channel_id); - if( zAddData.empty()) { - zAddData = g_Locale->getText(LOCALE_TIMERLIST_PROGRAM_UNKNOWN); - } - - if(timer.epgID!=0) { - CEPGData epgdata; - zAddData += " :\n"; - if (CEitManager::getInstance()->getEPGid(timer.epgID, timer.epg_starttime, &epgdata)) { - zAddData += epgdata.title; - } - else if(strlen(timer.epgTitle)!=0) { - zAddData += timer.epgTitle; - } - } - else if(strlen(timer.epgTitle)!=0) { - zAddData += timer.epgTitle; - } - - name += zAddData; - } + getAnnounceEpgName( eventinfo, name); ShowHintUTF( LOCALE_MESSAGEBOX_INFO, name.c_str() ); } - + delete [] (unsigned char*) data; return messages_return::handled; } else if( msg == NeutrinoMessages::ANNOUNCE_RECORD) { my_system(NEUTRINO_RECORDING_TIMER_SCRIPT); - + CTimerd::RecordingInfo * eventinfo = (CTimerd::RecordingInfo *) data; if (g_settings.recording_type == RECORDING_FILE) { - char * recordingDir = ((CTimerd::RecordingInfo*)data)->recordingDir; + char * recordingDir = eventinfo->recordingDir; for(int i=0 ; i < NETWORK_NFS_NR_OF_ENTRIES ; i++) { if (strcmp(g_settings.network_nfs_local_dir[i],recordingDir) == 0) { printf("[neutrino] waking up %s (%s)\n",g_settings.network_nfs_ip[i].c_str(),recordingDir); @@ -2717,13 +2683,16 @@ _repeat: CRecordManager::getInstance()->StopAutoRecord(); if(!CRecordManager::getInstance()->RecordingStatus()) { dvbsub_stop(); //FIXME if same channel ? - t_channel_id channel_id=((CTimerd::RecordingInfo*)data)->channel_id; + t_channel_id channel_id=eventinfo->channel_id; g_Zapit->zapTo_serviceID_NOWAIT(channel_id); } } + if(( mode != mode_scart ) && ( mode != mode_standby )){ + std::string name = g_Locale->getText(LOCALE_RECORDTIMER_ANNOUNCE); + getAnnounceEpgName(eventinfo, name); + ShowHintUTF(LOCALE_MESSAGEBOX_INFO, name.c_str()); + } delete[] (unsigned char*) data; - if( mode != mode_scart ) - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_RECORDTIMER_ANNOUNCE)); return messages_return::handled; } else if( msg == NeutrinoMessages::ANNOUNCE_SLEEPTIMER) { @@ -3870,6 +3839,33 @@ void CNeutrinoApp::SDT_ReloadChannels() } } +void CNeutrinoApp::getAnnounceEpgName(CTimerd::RecordingInfo * eventinfo, std::string &name) +{ + + name += "\n"; + + std::string zAddData = CServiceManager::getInstance()->GetServiceName(eventinfo->channel_id); + if( zAddData.empty()) { + zAddData = g_Locale->getText(LOCALE_TIMERLIST_PROGRAM_UNKNOWN); + } + + if(eventinfo->epgID!=0) { + CEPGData epgdata; + zAddData += " :\n"; + if (CEitManager::getInstance()->getEPGid(eventinfo->epgID, eventinfo->epg_starttime, &epgdata)) { + zAddData += epgdata.title; + } + else if(strlen(eventinfo->epgTitle)!=0) { + zAddData += eventinfo->epgTitle; + } + } + else if(strlen(eventinfo->epgTitle)!=0) { + zAddData += eventinfo->epgTitle; + } + + name += zAddData; +} + void CNeutrinoApp::Cleanup() { #ifdef EXIT_CLEANUP diff --git a/src/neutrino.h b/src/neutrino.h index 4353bd076..d3e242436 100644 --- a/src/neutrino.h +++ b/src/neutrino.h @@ -136,6 +136,7 @@ private: void scartMode( bool bOnOff ); void standbyMode( bool bOnOff, bool fromDeepStandby = false ); void saveEpg(bool cvfd_mode); + void getAnnounceEpgName(CTimerd::RecordingInfo * eventinfo, std::string &name); void ExitRun(const bool write_si = true, int retcode = 0); void RealRun(CMenuWidget &mainSettings); From 407f4fa3e96613d0e94b9da48589a7f37d52034b Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 29 Oct 2012 11:01:29 +0100 Subject: [PATCH 07/11] neutrino: show epg infos on announce recording, supplement to 9c9febce5745c0284190f08c8fed7dcae55cb1b8 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/c44683151e9dc3075e4be5f12a9ae75f3a181572 Author: Jacek Jendrzej Date: 2012-10-29 (Mon, 29 Oct 2012) Origin message was: ------------------ neutrino: show epg infos on announce recording, supplement to 9c9febce5745c0284190f08c8fed7dcae55cb1b8 --- src/timerd/timermanager.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/timerd/timermanager.cpp b/src/timerd/timermanager.cpp index ef84e1526..9f1386050 100644 --- a/src/timerd/timermanager.cpp +++ b/src/timerd/timermanager.cpp @@ -1250,8 +1250,15 @@ void CTimerEvent_Record::Refresh() //============================================================= void CTimerEvent_Zapto::announceEvent() { + Refresh(); + CTimerd::RecordingInfo ri=eventInfo; + ri.eventID=eventID; + ri.recordingDir[0] = 0; + strcpy(ri.epgTitle, epgTitle.substr(0,sizeof(ri.epgTitle)-1).c_str()); + CTimerManager::getInstance()->getEventServer()->sendEvent(CTimerdClient::EVT_ANNOUNCE_ZAPTO, - CEventServer::INITID_TIMERD); + CEventServer::INITID_TIMERD, + &ri,sizeof(CTimerd::RecordingInfo)); } //------------------------------------------------------------ void CTimerEvent_Zapto::fireEvent() From 7689479d21878d1a930a2b35ee679e668fe9c63b Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 29 Oct 2012 12:42:34 +0100 Subject: [PATCH 08/11] src/neutrino.cpp: dont zap on record announce if same channel Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/38479e11bf49d914064a4a34f15e7a3077ab4aa1 Author: Jacek Jendrzej Date: 2012-10-29 (Mon, 29 Oct 2012) --- src/neutrino.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 406d2fa8a..48016d67b 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2678,11 +2678,11 @@ _repeat: } } - if( g_settings.recording_zap_on_announce && (mode != mode_standby) ) { + if( g_settings.recording_zap_on_announce && (mode != mode_standby) && (eventinfo->channel_id != CZapit::getInstance()->GetCurrentChannelID())) { //TODO check transponder ? CRecordManager::getInstance()->StopAutoRecord(); if(!CRecordManager::getInstance()->RecordingStatus()) { - dvbsub_stop(); //FIXME if same channel ? + dvbsub_stop(); t_channel_id channel_id=eventinfo->channel_id; g_Zapit->zapTo_serviceID_NOWAIT(channel_id); } From e0388860f98c8f340623456e9f32bda736b708cb Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 29 Oct 2012 13:24:11 +0100 Subject: [PATCH 09/11] src/driver/vfd.cpp: -fix ioctl error on shutdown Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/c2052784ec013abc8ddb5c48f81dafa93bb2a0cc Author: Jacek Jendrzej Date: 2012-10-29 (Mon, 29 Oct 2012) --- src/driver/vfd.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/driver/vfd.cpp b/src/driver/vfd.cpp index 670f0a66f..b08ee78de 100644 --- a/src/driver/vfd.cpp +++ b/src/driver/vfd.cpp @@ -73,8 +73,10 @@ CVFD::CVFD() CVFD::~CVFD() { - if(fd > 0) + if(fd > 0){ close(fd); + fd = -1; + } } CVFD* CVFD::getInstance() @@ -678,7 +680,7 @@ void CVFD::Clear() void CVFD::ShowIcon(vfd_icon icon, bool show) { - if(!has_lcd) return; + if(!has_lcd || fd < 0) return; //printf("CVFD::ShowIcon %s %x\n", show ? "show" : "hide", (int) icon); int ret = ioctl(fd, show ? IOC_VFD_SET_ICON : IOC_VFD_CLEAR_ICON, icon); if(ret < 0) From 22030620dcb7cfbd5e58679b3ef42c69b662572c Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 29 Oct 2012 14:29:03 +0100 Subject: [PATCH 10/11] neutrino.cpp: handle deepstandy-scripts in same way as the other scripts Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/5284ffa3d64993a1158064f9b970aca470f01a77 Author: vanhofen Date: 2012-10-29 (Mon, 29 Oct 2012) Origin message was: ------------------ - neutrino.cpp: handle deepstandy-scripts in same way as the other scripts --- src/global.h | 2 ++ src/neutrino.cpp | 14 ++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/global.h b/src/global.h index e0fe58160..6dc24d549 100644 --- a/src/global.h +++ b/src/global.h @@ -66,6 +66,8 @@ #define NEUTRINO_RECORDING_ENDED_SCRIPT CONFIGDIR "/recording.end" #define NEUTRINO_ENTER_STANDBY_SCRIPT CONFIGDIR "/standby.on" #define NEUTRINO_LEAVE_STANDBY_SCRIPT CONFIGDIR "/standby.off" +#define NEUTRINO_ENTER_DEEPSTANDBY_SCRIPT CONFIGDIR "/deepstandby.on" +#define NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT CONFIGDIR "/deepstandby.off" #define MOVIEPLAYER_START_SCRIPT CONFIGDIR "/movieplayer.start" #define MOVIEPLAYER_END_SCRIPT CONFIGDIR "/movieplayer.end" diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 48016d67b..6c6719328 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1751,10 +1751,9 @@ void wake_up( bool &wakeup) } printf("[timerd] wakeup from standby: %s\n", wakeup ? "yes" : "no"); if(!wakeup){ - const char *neutrino_leave_deepstandby_script = CONFIGDIR "/deepstandby.off"; - printf("[%s] executing %s\n",__FILE__ ,neutrino_leave_deepstandby_script); - if (my_system(neutrino_leave_deepstandby_script) != 0) - perror( neutrino_leave_deepstandby_script ); + puts("[neutrino.cpp] executing " NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT "."); + if (my_system(NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT) != 0) + perror(NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT " failed"); } #endif @@ -2913,10 +2912,9 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode) saveSetup(NEUTRINO_SETTINGS_FILE); if(retcode) { - const char *neutrino_enter_deepstandby_script = CONFIGDIR "/deepstandby.on"; - printf("[%s] executing %s\n",__FILE__ ,neutrino_enter_deepstandby_script); - if (my_system(neutrino_enter_deepstandby_script) != 0) - perror(neutrino_enter_deepstandby_script ); + puts("[neutrino.cpp] executing " NEUTRINO_ENTER_DEEPSTANDBY_SCRIPT "."); + if (my_system(NEUTRINO_ENTER_DEEPSTANDBY_SCRIPT) != 0) + perror(NEUTRINO_ENTER_DEEPSTANDBY_SCRIPT " failed"); printf("entering off state\n"); mode = mode_off; From dad73cc6ef9e4733089177e2894ae665f5621f96 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 29 Oct 2012 14:45:00 +0100 Subject: [PATCH 11/11] neutrino.cpp: fix funny typo :) Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/4f3e3a90c4d8d92359aa6e33a60f76063d6e1105 Author: vanhofen Date: 2012-10-29 (Mon, 29 Oct 2012) Origin message was: ------------------ - neutrino.cpp: fix funny typo :) --- src/neutrino.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 6c6719328..495ba7b5a 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1857,9 +1857,9 @@ TIMER_START(); dprintf(DEBUG_NORMAL, "g_info.has_fan: %d\n", g_info.has_fan); //fan speed if (g_info.has_fan) { - CFanControlNotifier * funNotifier= new CFanControlNotifier(); - funNotifier->changeNotify(NONEXISTANT_LOCALE, (void*) &g_settings.fan_speed); - delete funNotifier; + CFanControlNotifier * fanNotifier= new CFanControlNotifier(); + fanNotifier->changeNotify(NONEXISTANT_LOCALE, (void*) &g_settings.fan_speed); + delete fanNotifier; } dvbsub_init(); @@ -2987,9 +2987,9 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode) powerManager->SetStandby(true, true); if (g_info.delivery_system == DVB_S && (cs_get_revision() < 8)) { int fspeed = 0; - CFanControlNotifier * funNotifier= new CFanControlNotifier(); - funNotifier->changeNotify(NONEXISTANT_LOCALE, (void *) &fspeed); - delete funNotifier; + CFanControlNotifier * fanNotifier= new CFanControlNotifier(); + fanNotifier->changeNotify(NONEXISTANT_LOCALE, (void *) &fspeed); + delete fanNotifier; } if (powerManager) { powerManager->Close(); @@ -3022,8 +3022,8 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode) //fan speed if (g_info.has_fan) { int fspeed = 0; - CFanControlNotifier funNotifier; - funNotifier.changeNotify(NONEXISTANT_LOCALE, (void *) &fspeed); + CFanControlNotifier fanNotifier; + fanNotifier.changeNotify(NONEXISTANT_LOCALE, (void *) &fspeed); } //CVFD::getInstance()->ShowText(g_Locale->getText(LOCALE_MAINMENU_REBOOT)); stop_video(); @@ -3212,9 +3212,9 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby ) //fan speed if (g_info.has_fan) { int fspeed = 1; - CFanControlNotifier * funNotifier= new CFanControlNotifier(); - funNotifier->changeNotify(NONEXISTANT_LOCALE, (void *) &fspeed); - delete funNotifier; + CFanControlNotifier * fanNotifier= new CFanControlNotifier(); + fanNotifier->changeNotify(NONEXISTANT_LOCALE, (void *) &fspeed); + delete fanNotifier; } frameBuffer->setActive(false); // Active standby on @@ -3239,9 +3239,9 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby ) frameBuffer->setActive(true); //fan speed if (g_info.has_fan) { - CFanControlNotifier * funNotifier= new CFanControlNotifier(); - funNotifier->changeNotify(NONEXISTANT_LOCALE, (void*) &g_settings.fan_speed); - delete funNotifier; + CFanControlNotifier * fanNotifier= new CFanControlNotifier(); + fanNotifier->changeNotify(NONEXISTANT_LOCALE, (void*) &g_settings.fan_speed); + delete fanNotifier; } puts("[neutrino.cpp] executing " NEUTRINO_LEAVE_STANDBY_SCRIPT ".");