From 260ed6c963554e92ccc0e00d6046215a6950fb34 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 23 Sep 2017 17:33:34 +0200 Subject: [PATCH 01/21] add LUA_CFLAGS everywhere widget/menue.h is used Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/78532e7e215b27e42a9d08c1a27625441aeadb32 Author: Stefan Seyfried Date: 2017-09-23 (Sat, 23 Sep 2017) --- src/Makefile.am | 1 + src/daemonc/Makefile.am | 1 + src/driver/Makefile.am | 1 + src/driver/audiodec/Makefile.am | 1 + src/driver/pictureviewer/Makefile.am | 1 + src/gui/Makefile.am | 1 + src/gui/bedit/Makefile.am | 1 + src/gui/components/Makefile.am | 1 + src/gui/moviebrowser/Makefile.am | 1 + src/gui/widget/Makefile.am | 1 + src/nhttpd/tuxboxapi/Makefile.am | 1 + src/system/Makefile.am | 1 + src/zapit/src/Makefile.am | 1 + 13 files changed, 13 insertions(+) diff --git a/src/Makefile.am b/src/Makefile.am index 8ea9e536e..ae101169f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -23,6 +23,7 @@ AM_CPPFLAGS = \ @SIGC_CFLAGS@ \ @FREETYPE_CFLAGS@ \ @AVFORMAT_CFLAGS@ \ + @LUA_CFLAGS@ \ @HWLIB_CFLAGS@ if BOXTYPE_TRIPLE diff --git a/src/daemonc/Makefile.am b/src/daemonc/Makefile.am index c272b2dee..a4df3eae6 100644 --- a/src/daemonc/Makefile.am +++ b/src/daemonc/Makefile.am @@ -13,6 +13,7 @@ AM_CPPFLAGS += \ @SIGC_CFLAGS@ \ @FREETYPE_CFLAGS@ \ @AVFORMAT_CFLAGS@ \ + @LUA_CFLAGS@ \ @HWLIB_CFLAGS@ diff --git a/src/driver/Makefile.am b/src/driver/Makefile.am index a19c4fadb..f4d708063 100644 --- a/src/driver/Makefile.am +++ b/src/driver/Makefile.am @@ -15,6 +15,7 @@ AM_CPPFLAGS = \ @SIGC_CFLAGS@ \ @FREETYPE_CFLAGS@ \ @AVFORMAT_CFLAGS@ \ + @LUA_CFLAGS@ \ @HWLIB_CFLAGS@ noinst_LIBRARIES = libneutrino_driver.a libneutrino_driver_netfile.a diff --git a/src/driver/audiodec/Makefile.am b/src/driver/audiodec/Makefile.am index d3332a48a..b49f0cdb9 100644 --- a/src/driver/audiodec/Makefile.am +++ b/src/driver/audiodec/Makefile.am @@ -11,6 +11,7 @@ AM_CPPFLAGS = \ @SIGC_CFLAGS@ \ @FREETYPE_CFLAGS@ \ @AVFORMAT_CFLAGS@ \ + @LUA_CFLAGS@ \ @HWLIB_CFLAGS@ noinst_LIBRARIES = libneutrino_driver_audiodec.a diff --git a/src/driver/pictureviewer/Makefile.am b/src/driver/pictureviewer/Makefile.am index bff7f879e..16bf123ca 100644 --- a/src/driver/pictureviewer/Makefile.am +++ b/src/driver/pictureviewer/Makefile.am @@ -9,6 +9,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/lib/libconfigfile \ @SIGC_CFLAGS@ \ @FREETYPE_CFLAGS@ \ + @LUA_CFLAGS@ \ @HWLIB_CFLAGS@ diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index b4dcfc413..dc5979882 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -37,6 +37,7 @@ AM_CPPFLAGS += \ @CURL_CFLAGS@ \ @FREETYPE_CFLAGS@ \ @AVFORMAT_CFLAGS@ \ + @LUA_CFLAGS@ \ @HWLIB_CFLAGS@ noinst_LIBRARIES = libtimerlist.a libneutrino_gui.a libneutrino_gui2.a diff --git a/src/gui/bedit/Makefile.am b/src/gui/bedit/Makefile.am index 1aaed9a3d..e07422406 100644 --- a/src/gui/bedit/Makefile.am +++ b/src/gui/bedit/Makefile.am @@ -11,6 +11,7 @@ AM_CPPFLAGS += \ -I$(top_srcdir)/lib/xmltree \ @SIGC_CFLAGS@ \ @FREETYPE_CFLAGS@ \ + @LUA_CFLAGS@ \ @HWLIB_CFLAGS@ noinst_LIBRARIES = libneutrino_gui_bedit.a diff --git a/src/gui/components/Makefile.am b/src/gui/components/Makefile.am index e43158b13..3364ad773 100644 --- a/src/gui/components/Makefile.am +++ b/src/gui/components/Makefile.am @@ -11,6 +11,7 @@ AM_CPPFLAGS += \ -I$(top_srcdir)/lib/xmltree \ @SIGC_CFLAGS@ \ @FREETYPE_CFLAGS@ \ + @LUA_CFLAGS@ \ @HWLIB_CFLAGS@ noinst_LIBRARIES = libneutrino_gui_components.a diff --git a/src/gui/moviebrowser/Makefile.am b/src/gui/moviebrowser/Makefile.am index 46379f2ca..438c3ac84 100644 --- a/src/gui/moviebrowser/Makefile.am +++ b/src/gui/moviebrowser/Makefile.am @@ -11,6 +11,7 @@ AM_CPPFLAGS += \ -I$(top_srcdir)/lib/xmltree \ @SIGC_CFLAGS@ \ @FREETYPE_CFLAGS@ \ + @LUA_CFLAGS@ \ @HWLIB_CFLAGS@ noinst_LIBRARIES = libneutrino_gui_moviebrowser.a diff --git a/src/gui/widget/Makefile.am b/src/gui/widget/Makefile.am index 838ba162f..6a0c88bd5 100644 --- a/src/gui/widget/Makefile.am +++ b/src/gui/widget/Makefile.am @@ -10,6 +10,7 @@ AM_CPPFLAGS += \ -I$(top_srcdir)/lib/libconfigfile \ @SIGC_CFLAGS@ \ @FREETYPE_CFLAGS@ \ + @LUA_CFLAGS@ \ @HWLIB_CFLAGS@ noinst_LIBRARIES = libneutrino_gui_widget.a libneutrino_gui_widget2.a diff --git a/src/nhttpd/tuxboxapi/Makefile.am b/src/nhttpd/tuxboxapi/Makefile.am index 2376c052c..9bae88869 100644 --- a/src/nhttpd/tuxboxapi/Makefile.am +++ b/src/nhttpd/tuxboxapi/Makefile.am @@ -16,6 +16,7 @@ AM_CPPFLAGS += \ @SIGC_CFLAGS@ \ @FREETYPE_CFLAGS@ \ @AVFORMAT_CFLAGS@ \ + @LUA_CFLAGS@ \ @HWLIB_CFLAGS@ noinst_LIBRARIES = libnhttpd_tuxboxapi.a diff --git a/src/system/Makefile.am b/src/system/Makefile.am index 916037323..63fb188f2 100644 --- a/src/system/Makefile.am +++ b/src/system/Makefile.am @@ -20,6 +20,7 @@ AM_CPPFLAGS = \ @SIGC_CFLAGS@ \ @FREETYPE_CFLAGS@ \ @AVFORMAT_CFLAGS@ \ + @LUA_CFLAGS@ \ @HWLIB_CFLAGS@ noinst_LIBRARIES = libneutrino_system.a diff --git a/src/zapit/src/Makefile.am b/src/zapit/src/Makefile.am index a8e7a9cdb..2e6427d32 100644 --- a/src/zapit/src/Makefile.am +++ b/src/zapit/src/Makefile.am @@ -12,6 +12,7 @@ AM_CPPFLAGS += \ -I$(top_srcdir)/lib/xmltree \ @FREETYPE_CFLAGS@ \ @SIGC_CFLAGS@ \ + @LUA_CFLAGS@ \ @HWLIB_CFLAGS@ noinst_LIBRARIES = libzapit.a From f7b93d88e27fcb060dfc6af533f77adac9ae2cca Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 23 Sep 2017 18:11:47 +0200 Subject: [PATCH 02/21] add comments to suppres -Wimplicit-fallthrough warnings Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/a497a2b86cb6ca74464d2d309c35da3170fe8c30 Author: Stefan Seyfried Date: 2017-09-23 (Sat, 23 Sep 2017) --- lib/jsoncpp/jsoncpp.cpp | 1 + src/driver/netfile.cpp | 1 + src/driver/radiotext.cpp | 1 + src/driver/screenshot.cpp | 2 ++ src/gui/lua/lua_threads_copy.cpp | 1 + src/gui/motorcontrol.cpp | 2 ++ src/gui/screensetup.cpp | 1 + src/gui/widget/menue.cpp | 3 +++ src/neutrino.cpp | 1 + src/nhttpd/yhttpd_core/yhook.cpp | 2 +- src/system/ytparser.cpp | 1 + src/zapit/src/frontend.cpp | 5 ++++- 12 files changed, 19 insertions(+), 2 deletions(-) diff --git a/lib/jsoncpp/jsoncpp.cpp b/lib/jsoncpp/jsoncpp.cpp index ce72ec1d8..59c98d5f7 100644 --- a/lib/jsoncpp/jsoncpp.cpp +++ b/lib/jsoncpp/jsoncpp.cpp @@ -1455,6 +1455,7 @@ bool OurReader::readToken(Token& token) { ok = readStringSingleQuote(); break; } // else continue + /* is a break missing here? or is this correct? */ case '/': token.type_ = tokenComment; ok = readComment(); diff --git a/src/driver/netfile.cpp b/src/driver/netfile.cpp index 9b9add628..9971c9eab 100644 --- a/src/driver/netfile.cpp +++ b/src/driver/netfile.cpp @@ -1027,6 +1027,7 @@ FILE *f_open(const char *filename, const char *acctype) /* create the correct url from the station number */ CRLFCut(url.host); sprintf(url.url, "http://classic.shoutcast.com/sbin/shoutcast-playlist.pls?rn=%s&file=filename.pls", url.host); + /* fall through */ case MODE_PLS: { char *ptr2, /*buf[4096], use local buf from function */ servers[25][1024]; diff --git a/src/driver/radiotext.cpp b/src/driver/radiotext.cpp index 773c51034..e73207964 100644 --- a/src/driver/radiotext.cpp +++ b/src/driver/radiotext.cpp @@ -289,6 +289,7 @@ if (i < 0) { fprintf(stderr, "RT %s: i < 0 (%d)\n", __FUNCTION__, i); break; } switch (val) { case 0x0a: // RT have_radiotext = true; + /* fall through */ case 0x46: // RTplus-Tags case 0xda: // RASS case 0x07: // PTY diff --git a/src/driver/screenshot.cpp b/src/driver/screenshot.cpp index 8a1e57d80..4e4b1796c 100644 --- a/src/driver/screenshot.cpp +++ b/src/driver/screenshot.cpp @@ -275,6 +275,7 @@ bool CScreenShot::SaveFile() break; default: printf("CScreenShot::SaveFile unsupported format %d, using jpeg\n", format); + /* fall through */ case FORMAT_JPG: ret = SaveJpg(); break; @@ -514,6 +515,7 @@ void CScreenShot::MakeFileName(const t_channel_id channel_id) break; default: printf("CScreenShot::MakeFileName unsupported format %d, using jpeg\n", format); + /* fall through */ case FORMAT_JPG: strcat(fname, ".jpg"); break; diff --git a/src/gui/lua/lua_threads_copy.cpp b/src/gui/lua/lua_threads_copy.cpp index a7d140018..6dba1651f 100644 --- a/src/gui/lua/lua_threads_copy.cpp +++ b/src/gui/lua/lua_threads_copy.cpp @@ -119,6 +119,7 @@ int CLLThread::llthread_copy_value(llthread_copy_state *state, int depth, int id lua_pushcfunction(state->to_L, fn); break; } + /* else fall through */ case LUA_TUSERDATA: case LUA_TTHREAD: default: diff --git a/src/gui/motorcontrol.cpp b/src/gui/motorcontrol.cpp index 1b9e38e36..7f3930a3c 100644 --- a/src/gui/motorcontrol.cpp +++ b/src/gui/motorcontrol.cpp @@ -350,7 +350,9 @@ void CMotorControl::motorStep(bool west) case STEP_MODE_AUTO: moving = 1; paintStatus(); + /* fall through */ default: + /* what is STEP_MODE_OFF supposed to do? */ g_Zapit->sendMotorCommand(0xE0, 0x31, cmd, 1, 40, 0); } } diff --git a/src/gui/screensetup.cpp b/src/gui/screensetup.cpp index 207020eab..5c1e29647 100644 --- a/src/gui/screensetup.cpp +++ b/src/gui/screensetup.cpp @@ -173,6 +173,7 @@ int CScreenSetup::exec(CMenuTarget* parent, const std::string &) ( g_settings.screen_EndY != y_coord[1] ) ) && (ShowMsg(LOCALE_VIDEOMENU_SCREENSETUP, LOCALE_MESSAGEBOX_DISCARD, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbCancel) == CMsgBox::mbrCancel)) break; + /* falls through */ case CRCInput::RC_timeout: loop = false; diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index c9e377960..e8b2bd6f6 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -799,6 +799,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) switch ( rv ) { case menu_return::RETURN_EXIT_ALL: retval = menu_return::RETURN_EXIT_ALL; + /* fall through */ case menu_return::RETURN_EXIT: msg = CRCInput::RC_timeout; break; @@ -889,6 +890,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) break; case CRCInput::RC_up: dir = -1; + /* fall through */ default: /* fallthrough or RC_down => dir = 1 */ pos += dir; if (pos < 0 || pos >= (int)items.size()) @@ -949,6 +951,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) switch ( rv ) { case menu_return::RETURN_EXIT_ALL: retval = menu_return::RETURN_EXIT_ALL; + /* fall through */ case menu_return::RETURN_EXIT: msg = CRCInput::RC_timeout; break; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 7f114dbeb..9d1aedbbc 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1816,6 +1816,7 @@ void CNeutrinoApp::SetChannelMode(int newmode) break; default: newmode = LIST_MODE_PROV; + /* fall through */ case LIST_MODE_PROV: if(mode == mode_radio) bouquetList = RADIObouquetList; diff --git a/src/nhttpd/yhttpd_core/yhook.cpp b/src/nhttpd/yhttpd_core/yhook.cpp index 2d4a88d4d..57acb79b6 100644 --- a/src/nhttpd/yhttpd_core/yhook.cpp +++ b/src/nhttpd/yhttpd_core/yhook.cpp @@ -283,7 +283,7 @@ std::string CyhookHandler::BuildHeader(bool cache) { case HTTP_MOVED_PERMANENTLY: // Status HTTP_*_TEMPORARILY (redirection) result += string_printf("Location: %s\r\n", NewURL.c_str()); - // NO break HERE !!! + // fall through default: time_t timer = time(0); diff --git a/src/system/ytparser.cpp b/src/system/ytparser.cpp index 6bd43c576..a2762f279 100644 --- a/src/system/ytparser.cpp +++ b/src/system/ytparser.cpp @@ -518,6 +518,7 @@ bool cYTFeedParser::ParseFeed(yt_feed_mode_t mode, std::string search, std::stri default: //trailer = "&time=today"; curfeed = "&chart=mostPopular"; + break; case MOST_POPULAR_ALL_TIME: curfeed = "&chart=mostPopular"; break; diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index a31a2eca4..e03b260f7 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -456,6 +456,7 @@ fe_code_rate_t CFrontend::getCodeRate(const uint8_t fec_inner, delivery_system_t default: if (zapit_debug) printf("no valid fec for DVB-%c set.. assume auto\n", (delsys == DVB_S ? 'S' : (delsys == DVB_C ? 'C' : 'T'))); + /* fall through */ case fAuto: fec = FEC_AUTO; break; @@ -492,6 +493,7 @@ fe_code_rate_t CFrontend::getCodeRate(const uint8_t fec_inner, delivery_system_t default: if (zapit_debug) printf("no valid fec for DVB-S2 set.. !!\n"); + /* fall through */ case fAuto: fec = FEC_AUTO; break; @@ -814,6 +816,7 @@ void CFrontend::getXMLDelsysFEC(fe_code_rate_t xmlfec, delivery_system_t & delsy break; default: printf("[frontend] getXMLDelsysFEC: unknown FEC: %d !!!\n", xmlfec); + /* fall through */ case FEC_S2_AUTO: case FEC_AUTO: fec = FEC_AUTO; @@ -890,7 +893,7 @@ void CFrontend::getDelSys(delivery_system_t delsys, int f, int m, const char *&f mod = "QPSK"; // AKA QAM_4 break; } - /* fallthrouh for FE_QAM... */ + /* fall through */ case QAM_AUTO: default: mod = "QAM_AUTO"; From 56d5e50457015eeb73b54bd975eda70902e245b5 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 23 Sep 2017 18:13:03 +0200 Subject: [PATCH 03/21] pictureviewer: fix build with gcc7 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/2d70e17dc5902507d0d46ca2ff98a2cf5c4335aa Author: Stefan Seyfried Date: 2017-09-23 (Sat, 23 Sep 2017) --- src/driver/pictureviewer/crw.cpp | 17 +++++++++-------- src/driver/pictureviewer/jpeg.cpp | 17 +++++++++-------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/driver/pictureviewer/crw.cpp b/src/driver/pictureviewer/crw.cpp index e081aba57..1de75cdc7 100644 --- a/src/driver/pictureviewer/crw.cpp +++ b/src/driver/pictureviewer/crw.cpp @@ -173,7 +173,7 @@ int fh_crw_load(const char *filename,unsigned char **buffer,int* xp,int* /*yp*/) struct jpeg_decompress_struct *ciptr; struct r_crw_jpeg_error_mgr emgr; unsigned char *bp; - int px/*,py*/,c,x=*xp; + int px/*,py*/,c,x=*xp, ix; FILE *fh; JSAMPLE *lb; @@ -195,21 +195,22 @@ int fh_crw_load(const char *filename,unsigned char **buffer,int* xp,int* /*yp*/) jpeg_stdio_src(ciptr,fh); jpeg_read_header(ciptr,TRUE); ciptr->out_color_space=JCS_RGB; - if(x==(int)ciptr->image_width) + ix = (int)ciptr->image_width; + if (x == ix) ciptr->scale_denom=1; #if __cplusplus < 201103 - else if(abs(x*2 - ciptr->image_width) < 2) + else if (abs(x*2 - ix) < 2) ciptr->scale_denom=2; - else if(abs(x*4 - ciptr->image_width) < 4) + else if (abs(x*4 - ix) < 4) ciptr->scale_denom=4; - else if(abs(x*8 - ciptr->image_width) < 8) + else if (abs(x*8 - ix) < 8) ciptr->scale_denom=8; #else - else if(std::abs(x*2 - ciptr->image_width) < 2) + else if (std::abs(x*2 - ix) < 2) ciptr->scale_denom=2; - else if(std::abs(x*4 - ciptr->image_width) < 4) + else if (std::abs(x*4 - ix) < 4) ciptr->scale_denom=4; - else if(std::abs(x*8 - ciptr->image_width) < 8) + else if (std::abs(x*8 - ix) < 8) ciptr->scale_denom=8; #endif else diff --git a/src/driver/pictureviewer/jpeg.cpp b/src/driver/pictureviewer/jpeg.cpp index accb8a512..a61c91229 100644 --- a/src/driver/pictureviewer/jpeg.cpp +++ b/src/driver/pictureviewer/jpeg.cpp @@ -72,7 +72,7 @@ int fh_jpeg_load(const char *filename,unsigned char **buffer,int* x,int* y) struct jpeg_decompress_struct *ciptr; struct r_jpeg_error_mgr emgr; unsigned char *bp; - int px,py,c; + int px,py,c, ix; FILE *fh; JSAMPLE *lb; @@ -94,21 +94,22 @@ int fh_jpeg_load(const char *filename,unsigned char **buffer,int* x,int* y) jpeg_read_header(ciptr,TRUE); ciptr->out_color_space=JCS_RGB; ciptr->dct_method=JDCT_FASTEST; - if(*x==(int)ciptr->image_width) + ix = (int)ciptr->image_width; + if(*x == ix) ciptr->scale_denom=1; #if __cplusplus < 201103 - else if(abs(*x*2 - ciptr->image_width) < 2) + else if (abs(*x*2 - ix) < 2) ciptr->scale_denom=2; - else if(abs(*x*4 - ciptr->image_width) < 4) + else if (abs(*x*4 - ix) < 4) ciptr->scale_denom=4; - else if(abs(*x*8 - ciptr->image_width) < 8) + else if (abs(*x*8 - ix) < 8) ciptr->scale_denom=8; #else - else if(std::abs(*x*2 - ciptr->image_width) < 2) + else if (std::abs(*x*2 - ix) < 2) ciptr->scale_denom=2; - else if(std::abs(*x*4 - ciptr->image_width) < 4) + else if (std::abs(*x*4 - ix) < 4) ciptr->scale_denom=4; - else if(std::abs(*x*8 - ciptr->image_width) < 8) + else if (std::abs(*x*8 - ix) < 8) ciptr->scale_denom=8; #endif else From 0793de5c77bd9ee37ae543d3ab9987afa25b34cf Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 23 Sep 2017 18:13:44 +0200 Subject: [PATCH 04/21] neutrinoyparser: fix invalid logic in func_unmount_get_list Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/b5cef9a2aae93ee3aa916c9e2c1f7681203c1470 Author: Stefan Seyfried Date: 2017-09-23 (Sat, 23 Sep 2017) --- src/nhttpd/tuxboxapi/neutrinoyparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp index ec25e65e3..31eb012c9 100644 --- a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp @@ -794,7 +794,7 @@ std::string CNeutrinoYParser::func_unmount_get_list(CyhookHandler *, std::strin in >> ymount >> ylocal_dir >> yfstype; in.ignore(std::numeric_limits::max(), '\n'); yfstype = trim(yfstype); - if( (yfstype == "nfs") << (yfstype == "ftp") || (yfstype == "lufsd") ) + if( (yfstype == "nfs") || (yfstype == "ftp") || (yfstype == "lufsd") ) { mounts=ylocal_dir +" on "+ ymount + " ("+yfstype+")"; ysel = ((j==0) ? "checked=\"checked\"" : ""); From e916363ac5bf5d559db10f9fb97a54d64741ea43 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 23 Sep 2017 18:14:22 +0200 Subject: [PATCH 05/21] moviplayer: suppress unused variable warning Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/597b40664fc70f22c1a0e590332330cc4d48baa9 Author: Stefan Seyfried Date: 2017-09-23 (Sat, 23 Sep 2017) --- src/gui/movieplayer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 1f7e94cac..f8c2c4482 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -2844,6 +2844,8 @@ void CMoviePlayerGui::makeScreenShot(bool autoshot, bool forcover) } } sc->Start(); +#else + (void)forcover; #endif if (autoshot) autoshot_done = true; From c6d8facd9768ddb6e29c51222c310a0211c43621 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 23 Sep 2017 19:16:20 +0200 Subject: [PATCH 06/21] Revert "fb_accel_sti: next try of catching the strange locking issue" This reverts commit bdadc2940bf36f66ddfe172c8959725241964ee1. Not a locking problem, but a wrap issue with time_monotonic_ms() Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/ad19e58032f4d07d0c41f47581d07c93aa564308 Author: Stefan Seyfried Date: 2017-09-23 (Sat, 23 Sep 2017) --- src/driver/fb_accel_sti.cpp | 78 ++++--------------------------------- 1 file changed, 7 insertions(+), 71 deletions(-) diff --git a/src/driver/fb_accel_sti.cpp b/src/driver/fb_accel_sti.cpp index f04161d84..17e342faf 100644 --- a/src/driver/fb_accel_sti.cpp +++ b/src/driver/fb_accel_sti.cpp @@ -42,9 +42,6 @@ #include -#include -#include - #include #include @@ -62,56 +59,6 @@ static size_t lbb_sz = 1920 * 1080; /* offset from fb start in 'pixels' */ static size_t lbb_off = lbb_sz * sizeof(fb_pixel_t); /* same in bytes */ static int backbuf_sz = 0; -static char lockfunc[256]; -static pthread_mutex_t mymutex = PTHREAD_MUTEX_INITIALIZER; - -#if 1 -#define mutex __invalid_mutex__ -#define LOCK_WAIT_MS 5 -#define NS_IN_SEC 1000000000LL -#define NS_IN_MS 1000000 -#define TRYLOCK_RET(m) \ - do { \ - struct timespec wait; \ - clock_gettime(CLOCK_REALTIME, &wait); \ - wait.tv_nsec += (LOCK_WAIT_MS * NS_IN_MS); \ - wait.tv_sec += wait.tv_nsec % NS_IN_SEC; \ - wait.tv_nsec %= NS_IN_SEC; \ - int status = pthread_mutex_timedlock(&mymutex, &wait); \ - if (status) { \ - printf(LOGTAG "::%s timedlock failed: %d (%s) locked: '%s'\n", __func__, \ - status, strerror(status), lockfunc); \ - return; \ - } \ - strcpy(lockfunc, __func__); \ - } while(0) - -#define UNLOCK(m) pthread_mutex_unlock(&mymutex) - -#else -#define TRYLOCK_RET(m) \ - do { \ - time_t _start = time_monotonic_ms(); \ - time_t _now = _start; \ - while (true) { \ - int status = m.trylock(); \ - if (status == 0) \ - break; \ - _now = time_monotonic_ms(); \ - usleep(1000); \ - if (_now - _start < LOCK_WAIT_MS) \ - continue; \ - printf(LOGTAG "::%s trylock failed after %dms: %d (%s) locked '%s'\n", __func__, \ - LOCK_WAIT_MS, status, (status > 0) ? strerror(status) : strerror(errno), \ - lockfunc); \ - return; \ - } \ - strcpy(lockfunc, __func__); \ - } while(0) - -#define UNLOCK(m) m.unlock() -#endif - void CFbAccelSTi::waitForIdle(const char *) { #if 0 /* blits too often and does not seem to be necessary */ @@ -124,10 +71,8 @@ void CFbAccelSTi::waitForIdle(const char *) } blit_mutex.unlock(); #endif -// OpenThreads::ScopedLock m_lock(mutex); - TRYLOCK_RET(mutex); + OpenThreads::ScopedLock m_lock(mutex); ioctl(fd, STMFBIO_SYNC_BLITTER); - UNLOCK(mutex); } CFbAccelSTi::CFbAccelSTi() @@ -326,12 +271,10 @@ void CFbAccelSTi::paintRect(const int x, const int y, const int dx, const int dy bltData.colour = col; mark(xx, yy, bltData.dst_right, bltData.dst_bottom); -// OpenThreads::ScopedLock m_lock(mutex); - TRYLOCK_RET(mutex); + OpenThreads::ScopedLock m_lock(mutex); if (ioctl(fd, STMFBIO_BLT, &bltData ) < 0) fprintf(stderr, "blitRect FBIO_BLIT: %m x:%d y:%d w:%d h:%d s:%d\n", xx,yy,width,height,stride); blit(); - UNLOCK(mutex); } void CFbAccelSTi::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff, uint32_t xp, uint32_t yp, bool transp) @@ -371,8 +314,7 @@ void CFbAccelSTi::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_ blt_data.dstMemSize = stride * yRes + lbb_off; mark(x, y, blt_data.dst_right, blt_data.dst_bottom); -// OpenThreads::ScopedLock m_lock(mutex); - TRYLOCK_RET(mutex); + OpenThreads::ScopedLock m_lock(mutex); ioctl(fd, STMFBIO_SYNC_BLITTER); if (fbbuff != backbuffer) memmove(backbuffer, fbbuff, mem_sz); @@ -381,7 +323,7 @@ void CFbAccelSTi::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_ if (ioctl(fd, STMFBIO_BLT_EXTERN, &blt_data) < 0) perror(LOGTAG "blit2FB STMFBIO_BLT_EXTERN"); - UNLOCK(mutex); + return; } #define BLIT_INTERVAL_MIN 40 @@ -435,13 +377,10 @@ void CFbAccelSTi::_blit() printf("%s %ld\n", __func__, now - last); last = now; #endif -// OpenThreads::ScopedLock m_lock(mutex); - TRYLOCK_RET(mutex); + OpenThreads::ScopedLock m_lock(mutex); #ifdef PARTIAL_BLIT - if (to_blit.xs == INT_MAX) { - UNLOCK(mutex); + if (to_blit.xs == INT_MAX) return; - } int srcXa = to_blit.xs; int srcYa = to_blit.ys; @@ -528,15 +467,13 @@ void CFbAccelSTi::_blit() to_blit.xs = to_blit.ys = INT_MAX; to_blit.xe = to_blit.ye = 0; #endif - UNLOCK(mutex); } /* not really used yet */ #ifdef PARTIAL_BLIT void CFbAccelSTi::mark(int xs, int ys, int xe, int ye) { -// OpenThreads::ScopedLock m_lock(mutex); - TRYLOCK_RET(mutex); + OpenThreads::ScopedLock m_lock(mutex); if (xs < to_blit.xs) to_blit.xs = xs; if (ys < to_blit.ys) @@ -565,7 +502,6 @@ void CFbAccelSTi::mark(int xs, int ys, int xe, int ye) *kill = 1; /* oh my */ } #endif - UNLOCK(mutex); } #else void CFbAccelSTi::mark(int, int, int, int) From 6534abad880fef6c1feb4a982952517098a7dfb3 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 23 Sep 2017 21:35:01 +0200 Subject: [PATCH 07/21] change time_monotonic_ms() from time_t to int64_t time_monotonic_ms values did wrap every ~24 days, leading to problems in code that did not cope with that. Instead of fixing all places where relative comparisons with time_monotonic_ms() are made, just use a bigger datatype. Convert all users to the new type. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/99ff4857ff646f2d6642d49df2ab28cee04f067d Author: Stefan Seyfried Date: 2017-09-23 (Sat, 23 Sep 2017) --- src/driver/abstime.c | 4 ++-- src/driver/abstime.h | 4 ++-- src/driver/fb_accel_glfb.cpp | 7 ++++--- src/driver/fb_accel_sti.cpp | 16 +++++++++------- src/eitd/sectionsd.cpp | 10 +++++----- src/eitd/xmlutil.cpp | 6 +++--- src/gui/movieplayer.h | 2 +- src/gui/streaminfo2.cpp | 4 ++-- src/gui/widget/shellwindow.cpp | 4 ++-- src/neutrino.cpp | 8 ++++---- src/zapit/src/frontend.cpp | 11 ++++++----- 11 files changed, 40 insertions(+), 36 deletions(-) diff --git a/src/driver/abstime.c b/src/driver/abstime.c index af7c1c7fc..e74c268c3 100644 --- a/src/driver/abstime.c +++ b/src/driver/abstime.c @@ -2,7 +2,7 @@ #include /* for perror */ #include -time_t time_monotonic_ms(void) +int64_t time_monotonic_ms(void) { struct timespec t; time_t ret; @@ -11,7 +11,7 @@ time_t time_monotonic_ms(void) perror("time_monotonic_ms clock_gettime"); return -1; } - ret = ((t.tv_sec + 604800)& 0x01FFFFF) * 1000; /* avoid overflow */ + ret = (t.tv_sec + 604800) * (int64_t)1000; /* avoid overflow */ ret += t.tv_nsec / 1000000; return ret; } diff --git a/src/driver/abstime.h b/src/driver/abstime.h index b530755b6..78d1e6117 100644 --- a/src/driver/abstime.h +++ b/src/driver/abstime.h @@ -6,8 +6,8 @@ extern "C" { #endif -extern time_t time_monotonic_ms(void); -extern time_t time_monotonic(void); +time_t time_monotonic(void); +int64_t time_monotonic_ms(void); uint64_t time_monotonic_us(void); #ifdef __cplusplus } diff --git a/src/driver/fb_accel_glfb.cpp b/src/driver/fb_accel_glfb.cpp index 2d9ba539f..d62ea65f1 100644 --- a/src/driver/fb_accel_glfb.cpp +++ b/src/driver/fb_accel_glfb.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include extern GLFramebuffer *glfb; @@ -115,18 +116,18 @@ void CFbAccelGLFB::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32 void CFbAccelGLFB::run() { printf(LOGTAG "run start\n"); - time_t last_blit = 0; + int64_t last_blit = INT64_MAX; blit_pending = false; blit_thread = true; blit_mutex.lock(); set_threadname("glfb::autoblit"); while (blit_thread) { blit_cond.wait(&blit_mutex, blit_pending ? BLIT_INTERVAL_MIN : BLIT_INTERVAL_MAX); - time_t now = time_monotonic_ms(); + int64_t now = time_monotonic_ms(); if (now - last_blit < BLIT_INTERVAL_MIN) { blit_pending = true; - //printf(LOGTAG "run: skipped, time %ld\n", now - last_blit); + //printf(LOGTAG "run: skipped, time %" PRId64 "\n", now - last_blit); } else { diff --git a/src/driver/fb_accel_sti.cpp b/src/driver/fb_accel_sti.cpp index 17e342faf..ad9d590d3 100644 --- a/src/driver/fb_accel_sti.cpp +++ b/src/driver/fb_accel_sti.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include @@ -331,7 +332,7 @@ void CFbAccelSTi::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_ void CFbAccelSTi::run() { printf(LOGTAG "::run start\n"); - time_t last_blit = 0; + int64_t last_blit = INT64_MAX; /* blit at first iteration */ blit_pending = false; blit_thread = true; set_threadname("stifb::autoblit"); @@ -340,11 +341,12 @@ void CFbAccelSTi::run() blit_cond.wait(&blit_mutex, blit_pending ? BLIT_INTERVAL_MIN : BLIT_INTERVAL_MAX); blit_mutex.unlock(); - time_t now = time_monotonic_ms(); - if (now - last_blit < BLIT_INTERVAL_MIN) + int64_t now = time_monotonic_ms(); + int64_t diff = now - last_blit; + if (diff < BLIT_INTERVAL_MIN) { blit_pending = true; - //printf(LOGTAG "::run: skipped, time %ld\n", now - last_blit); + //printf(LOGTAG "::run: skipped, time %" PRId64 "\n", diff); } else { @@ -372,9 +374,9 @@ void CFbAccelSTi::blit() void CFbAccelSTi::_blit() { #if 0 - static time_t last = 0; - time_t now = time_monotonic_ms(); - printf("%s %ld\n", __func__, now - last); + static int64_t last = 0; + int64_t now = time_monotonic_ms(); + printf("%s %" PRId64 "\n", __func__, now - last); last = now; #endif OpenThreads::ScopedLock m_lock(mutex); diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp index 058651960..1b05fef40 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -154,7 +154,7 @@ CSdtThread threadSDT; #endif #ifdef DEBUG_EVENT_LOCK -static time_t lockstart = 0; +static int64_t lockstart = 0; #endif static int sectionsd_stop = 0; @@ -209,9 +209,9 @@ inline void unlockEvents(void) { #ifdef DEBUG_EVENT_LOCK if (lockstart) { - time_t tmp = time_monotonic_ms() - lockstart; + int64_t tmp = time_monotonic_ms() - lockstart; if (tmp > 50) - xprintf("locked ms %d\n", tmp); + xprintf("locked ms %" PRId64 "\n", tmp); lockstart = 0; } #endif @@ -1485,12 +1485,12 @@ void CTimeThread::run() * shutdown" hack on with libcoolstream... :-( */ rc = dmx->Read(static_buf, MAX_SECTION_LENGTH, timeoutInMSeconds); #else - time_t start = time_monotonic_ms(); + int64_t start = time_monotonic_ms(); /* speed up shutdown by looping around Read() */ do { rc = dmx->Read(static_buf, MAX_SECTION_LENGTH, timeoutInMSeconds / 12); } while (running && rc == 0 - && (time_monotonic_ms() - start) < (time_t)timeoutInMSeconds); + && (time_monotonic_ms() - start) < (int64_t)timeoutInMSeconds); #endif xprintf("%s: get DVB time ch 0x%012" PRIx64 " rc: %d neutrino_sets_time %d\n", name.c_str(), current_service, rc, messaging_neutrino_sets_time); diff --git a/src/eitd/xmlutil.cpp b/src/eitd/xmlutil.cpp index eb70b58db..0eab74a32 100644 --- a/src/eitd/xmlutil.cpp +++ b/src/eitd/xmlutil.cpp @@ -486,12 +486,12 @@ void *insertEventsfromFile(void * data) std::string epg_dir = (char *) data; indexname = epg_dir + "index.xml"; - time_t now = time_monotonic_ms(); + int64_t now = time_monotonic_ms(); xmlDocPtr index_parser = parseXmlFile(indexname.c_str()); if (index_parser == NULL) { readEventsFromDir(epg_dir, ev_count); - printf("[sectionsd] Reading Information finished after %ld milliseconds (%d events)\n", + printf("[sectionsd] Reading Information finished after %" PRId64 " milliseconds (%d events)\n", time_monotonic_ms()-now, ev_count); reader_ready = true; pthread_exit(NULL); @@ -515,7 +515,7 @@ void *insertEventsfromFile(void * data) xmlFreeDoc(index_parser); printdate_ms(stdout); - printf("[sectionsd] Reading Information finished after %ld milliseconds (%d events)\n", + printf("[sectionsd] Reading Information finished after %" PRId64 " milliseconds (%d events)\n", time_monotonic_ms()-now, ev_count); reader_ready = true; diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h index 0b6cd507d..bef6bc9c9 100644 --- a/src/gui/movieplayer.h +++ b/src/gui/movieplayer.h @@ -142,7 +142,7 @@ class CMoviePlayerGui : public CMenuTarget unsigned short sub_supported[MAX_PLAYBACK_PIDS]; int currentspid; int min_x, min_y, max_x, max_y; - time_t end_time; + int64_t end_time; bool ext_subs; bool lock_subs; uint64_t last_read; diff --git a/src/gui/streaminfo2.cpp b/src/gui/streaminfo2.cpp index e1f560813..858a56973 100644 --- a/src/gui/streaminfo2.cpp +++ b/src/gui/streaminfo2.cpp @@ -1035,7 +1035,7 @@ int CStreamInfo2::update_rate () usleep(timeout * 1000); b_len = mp->GetReadCount(); } else { - time_t start = time_monotonic_ms(); + int64_t start = time_monotonic_ms(); /* always sample for ~100ms */ while (time_monotonic_ms() - start < timeout) { @@ -1043,7 +1043,7 @@ int CStreamInfo2::update_rate () if (ret >= 0) b_len += ret; } - //printf("ts: read %d time %d\n", b_len, time_monotonic_ms() - start); + //printf("ts: read %d time %" PRId64 "\n", b_len, time_monotonic_ms() - start); } //printf("ts: read %d\n", b_len); diff --git a/src/gui/widget/shellwindow.cpp b/src/gui/widget/shellwindow.cpp index bd5daa3ca..f2b641f5a 100644 --- a/src/gui/widget/shellwindow.cpp +++ b/src/gui/widget/shellwindow.cpp @@ -133,14 +133,14 @@ void CShellWindow::exec() fds.events = POLLIN | POLLHUP | POLLERR; fcntl(fds.fd, F_SETFL, fcntl(fds.fd, F_GETFL, 0) | O_NONBLOCK); - time_t lastPaint = time_monotonic_ms(); + int64_t lastPaint = time_monotonic_ms(); bool ok = true, nlseen = false, dirty = false, incomplete = false; char output[1024]; std::string txt = ""; std::string line = ""; do { - time_t now; + int64_t now; fds.revents = 0; int r = poll(&fds, 1, 300); if (r > 0) { diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 9d1aedbbc..96fb0d896 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2112,10 +2112,10 @@ void CNeutrinoApp::InitSectiondClient() #if 0 /* TODO: check if still needed */ /* wait for sectionsd to be able to process our registration */ - time_t t = time_monotonic_ms(); + int64_t t = time_monotonic_ms(); while (! sectionsd_isReady()) sleep(0); - dprintf(DEBUG_NORMAL, "had to wait %ld ms for sectionsd to start up\n", time_monotonic_ms() - t); + dprintf(DEBUG_NORMAL, "had to wait %" PRId64 " ms for sectionsd to start up\n", time_monotonic_ms() - t); #endif g_Sectionsd = new CSectionsdClient; struct timespec t; @@ -2370,10 +2370,10 @@ TIMER_START(); InitSectiondClient(); /* wait until timerd is ready... */ - time_t timerd_wait = time_monotonic_ms(); + int64_t timerd_wait = time_monotonic_ms(); while (timerd_signal >= 0) usleep(100); - dprintf(DEBUG_NORMAL, "had to wait %ld ms for timerd start...\n", time_monotonic_ms() - timerd_wait); + dprintf(DEBUG_NORMAL, "had to wait %" PRId64 " ms for timerd start...\n", time_monotonic_ms() - timerd_wait); InitTimerdClient(); // volume diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index e03b260f7..7b4be83e0 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -131,15 +131,16 @@ static const struct dtv_property dvbt_cmdargs[] = { #define diff(x,y) (max(x,y) - min(x,y)) #define FE_TIMER_INIT() \ - unsigned int timer_start; \ - static unsigned int tmin = 2000, tmax = 0; \ - unsigned int timer_msec = 0; + int64_t timer_start; \ + static uint32_t tmin = 2000, tmax = 0; \ + uint32_t timer_msec = 0; #define FE_TIMER_START() \ timer_start = time_monotonic_ms(); #define FE_TIMER_STOP(label) \ - timer_msec = time_monotonic_ms() - timer_start; \ + timer_msec = (uint32_t)(time_monotonic_ms() - \ + timer_start); \ if(tmin > timer_msec) tmin = timer_msec; \ if(tmax < timer_msec) tmax = timer_msec; \ printf("[fe%d] %s: %u msec (min %u max %u)\n", \ @@ -706,7 +707,7 @@ struct dvb_frontend_event CFrontend::getEvent(void) if (pfd.revents & (POLLIN | POLLPRI)) { //FE_TIMER_STOP("poll has event after"); - timer_msec = time_monotonic_ms() - timer_start; /* FE_TIMER_STOP does this :( */ + timer_msec = (uint32_t)(time_monotonic_ms() - timer_start); /* FE_TIMER_STOP does this :( */ memset(&event, 0, sizeof(struct dvb_frontend_event)); ret = ioctl(fd, FE_GET_EVENT, &event); From 5d1b60c6cf6101b600ca2a0e1c0630bff2924c88 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 23 Sep 2017 21:39:56 +0200 Subject: [PATCH 08/21] zapit: suppress one more implicit-fallthrough warning Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/62e964863655c1f4c98e25030112b1341bc8aec5 Author: Stefan Seyfried Date: 2017-09-23 (Sat, 23 Sep 2017) --- src/zapit/src/scan.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/zapit/src/scan.cpp b/src/zapit/src/scan.cpp index 6c190c330..bba6e472f 100644 --- a/src/zapit/src/scan.cpp +++ b/src/zapit/src/scan.cpp @@ -712,6 +712,7 @@ void CServiceScan::ChannelFound(uint8_t service_type, std::string providerName, case ST_NVOD_REFERENCE_SERVICE: case ST_NVOD_TIME_SHIFTED_SERVICE: CZapit::getInstance()->SendEvent(CZapitClient::EVT_SCAN_SERVICENAME, (void *) serviceName.c_str(), serviceName.length() + 1); + /* fall through */ case ST_DATA_BROADCAST_SERVICE: case ST_RCS_MAP: case ST_RCS_FLS: From df771dbb09eb4ca013a128f5e441fd6c4d1b66f0 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 23 Sep 2017 21:40:53 +0200 Subject: [PATCH 09/21] CMenuWidget: simplify menu_left_exit code, add missing break Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/8f4907f251810b36e5f60b52f5496b9f2b3b8fa9 Author: Stefan Seyfried Date: 2017-09-23 (Sat, 23 Sep 2017) --- src/gui/widget/menue.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index e8b2bd6f6..06722d2e8 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -927,16 +927,12 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) break; } case (CRCInput::RC_left): - { - if(hasItem() && selected > -1 && (int)items.size() > selected) { - CMenuItem* itemX = items[selected]; - if (!itemX->isMenueOptionChooser()) { - if (g_settings.menu_left_exit) - msg = CRCInput::RC_timeout; - break; - } - } + if (hasItem() && selected > -1 && (int)items.size() > selected) { + CMenuItem* itemX = items[selected]; + if (!itemX->isMenueOptionChooser() && g_settings.menu_left_exit) + msg = CRCInput::RC_timeout; } + break; case (CRCInput::RC_right): case (CRCInput::RC_ok): { From 0d550aad216115780a42aba64bdb478a1829f939 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 23 Sep 2017 23:40:09 +0200 Subject: [PATCH 10/21] zapit: properly initialize arrays in scanbat and scansdt Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/849755df82dac9249ba1d91e8fb0fbcce432ee15 Author: Stefan Seyfried Date: 2017-09-23 (Sat, 23 Sep 2017) --- src/zapit/src/scanbat.cpp | 2 +- src/zapit/src/scansdt.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zapit/src/scanbat.cpp b/src/zapit/src/scanbat.cpp index 49e731568..79e3a1b24 100644 --- a/src/zapit/src/scanbat.cpp +++ b/src/zapit/src/scanbat.cpp @@ -82,7 +82,7 @@ bool CBat::Read() int secdone[255]; int sectotal = -1; - memset(secdone, 0, 255); + memset(secdone, 0, sizeof(secdone)); cDemux * dmx = new cDemux(dmxnum); dmx->Open(DMX_PSI_CHANNEL); diff --git a/src/zapit/src/scansdt.cpp b/src/zapit/src/scansdt.cpp index 5ff2aa358..9114a0eea 100644 --- a/src/zapit/src/scansdt.cpp +++ b/src/zapit/src/scansdt.cpp @@ -68,7 +68,7 @@ bool CSdt::Read() int sectotal = -1; bool cable_hack_done = false; - memset(secdone, 0, 255); + memset(secdone, 0, sizeof(secdone)); cDemux * dmx = new cDemux(dmxnum); dmx->Open(DMX_PSI_CHANNEL); From 95e9342560c54d50acd80da5eb00854fb434cbdf Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 23 Sep 2017 23:40:54 +0200 Subject: [PATCH 11/21] moviebrowser: fix format-string warnings Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/a3a3df40bcad59756f577ed45cb159cdaec06a1c Author: Stefan Seyfried Date: 2017-09-23 (Sat, 23 Sep 2017) --- src/gui/moviebrowser/mb.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 4d0cc6e45..0005f6b26 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -2482,8 +2482,8 @@ bool CMovieBrowser::onDelete(bool cursor_only) getSelectedFiles(filelist, movielist); - printf("CMovieBrowser::onDelete(%s) filelist size: %d\n", cursor_only ? "true" : "false", filelist.size()); - printf("CMovieBrowser::onDelete(%s) movielist size: %d\n", cursor_only ? "true" : "false", movielist.size()); + printf("CMovieBrowser::onDelete(%s) filelist size: %zd\n", cursor_only ? "true" : "false", filelist.size()); + printf("CMovieBrowser::onDelete(%s) movielist size: %zd\n", cursor_only ? "true" : "false", movielist.size()); if (cursor_only || (filelist.empty() || movielist.empty())) { @@ -2498,8 +2498,8 @@ bool CMovieBrowser::onDelete(bool cursor_only) filelist.push_back(m_movieSelectionHandler->file); movielist.push_back(m_movieSelectionHandler); - printf("CMovieBrowser::onDelete(%s) filelist size: %d\n", cursor_only ? "true" : "false", filelist.size()); - printf("CMovieBrowser::onDelete(%s) movielist size: %d\n", cursor_only ? "true" : "false", movielist.size()); + printf("CMovieBrowser::onDelete(%s) filelist size: %zd\n", cursor_only ? "true" : "false", filelist.size()); + printf("CMovieBrowser::onDelete(%s) movielist size: %zd\n", cursor_only ? "true" : "false", movielist.size()); } MI_MOVIE_LIST dellist; From 56caf56d2e170943fbcf7645c818030200d9d4c5 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 23 Sep 2017 23:41:58 +0200 Subject: [PATCH 12/21] audioplayer: fix buffer overflow Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/602ea1b7a7cdf092b2b6bbd59272bd7cadf63243 Author: Stefan Seyfried Date: 2017-09-23 (Sat, 23 Sep 2017) --- src/gui/audioplayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 03c8d1a14..9375a4bfc 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -802,7 +802,7 @@ int CAudioPlayerGui::show() smsKey = m_SMSKeyInput.handleMsg(msg); //printf(" new key: %c", smsKey); /* show a hint box with current char (too slow at the moment?)*/ - char selectedKey[1]; + char selectedKey[2]; sprintf(selectedKey,"%c",smsKey); int x1=(g_settings.screen_EndX- g_settings.screen_StartX)/2 + g_settings.screen_StartX-50; int y1=(g_settings.screen_EndY- g_settings.screen_StartY)/2 + g_settings.screen_StartY; From ce3e947378dfe5bb40e578e266a337a78d180105 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 23 Sep 2017 23:43:59 +0200 Subject: [PATCH 13/21] subchannel_select: ensure buffer does not overflow Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/67f6b28b7d14d41c2e76d328817a203008a5d4d9 Author: Stefan Seyfried Date: 2017-09-23 (Sat, 23 Sep 2017) --- src/gui/subchannel_select.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/subchannel_select.cpp b/src/gui/subchannel_select.cpp index 36867ce1c..b6d688180 100644 --- a/src/gui/subchannel_select.cpp +++ b/src/gui/subchannel_select.cpp @@ -108,6 +108,8 @@ int CSubChannelSelectMenu::getNVODMenu(CMenuWidget* menu) } count++; + if (count > 9999) + break; } if ( g_RemoteControl->are_subchannels ) { From ea17090f1680d527eef08f8c12d9e9c1e04cd75c Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 23 Sep 2017 23:45:22 +0200 Subject: [PATCH 14/21] rcinput: disable timer debug messages Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/72301a167b4e153f1550c1827fc859ffb26472c3 Author: Stefan Seyfried Date: 2017-09-23 (Sat, 23 Sep 2017) --- src/driver/rcinput.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 145cc8639..ed48a1a16 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -473,7 +473,7 @@ int CRCInput::addTimer(uint64_t Interval, bool oneshot, bool correct_time ) _newtimer.correct_time = correct_time; -printf("adding timer %d (0x%llx, 0x%llx)\n", _newtimer.id, _newtimer.times_out, Interval); +//printf("adding timer %d (0x%" PRIx64 ", 0x%" PRIx64 ")\n", _newtimer.id, _newtimer.times_out, Interval); std::vector::iterator e; for ( e= timers.begin(); e!= timers.end(); ++e ) @@ -486,7 +486,7 @@ printf("adding timer %d (0x%llx, 0x%llx)\n", _newtimer.id, _newtimer.times_out, void CRCInput::killTimer(uint32_t &id) { -printf("killing timer %d\n", id); +//printf("killing timer %d\n", id); if(id == 0) return; From 1f9b352a0a7d94bc825a96b69fb6565aeb69e007 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 24 Sep 2017 13:55:44 +0200 Subject: [PATCH 15/21] abstime: fix time_monotonic_ms on 32bit systems m) Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/1ba7969f62a43c589618439f3c34aeeb08338d7c Author: Stefan Seyfried Date: 2017-09-24 (Sun, 24 Sep 2017) --- src/driver/abstime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/driver/abstime.c b/src/driver/abstime.c index e74c268c3..a242b7877 100644 --- a/src/driver/abstime.c +++ b/src/driver/abstime.c @@ -5,7 +5,7 @@ int64_t time_monotonic_ms(void) { struct timespec t; - time_t ret; + int64_t ret; if (clock_gettime(CLOCK_MONOTONIC, &t)) { perror("time_monotonic_ms clock_gettime"); From 90df10df66e4dbe984388df5097ac99cb9597ad9 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 24 Sep 2017 13:56:49 +0200 Subject: [PATCH 16/21] fb_accel: fix blit after time_monotonic_ms fix Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/7e85889d7b8cee49ef8b9190b2619651de89b84d Author: Stefan Seyfried Date: 2017-09-24 (Sun, 24 Sep 2017) --- src/driver/fb_accel_glfb.cpp | 2 +- src/driver/fb_accel_sti.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/driver/fb_accel_glfb.cpp b/src/driver/fb_accel_glfb.cpp index d62ea65f1..efed7d6b5 100644 --- a/src/driver/fb_accel_glfb.cpp +++ b/src/driver/fb_accel_glfb.cpp @@ -116,7 +116,7 @@ void CFbAccelGLFB::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32 void CFbAccelGLFB::run() { printf(LOGTAG "run start\n"); - int64_t last_blit = INT64_MAX; + int64_t last_blit = 0; blit_pending = false; blit_thread = true; blit_mutex.lock(); diff --git a/src/driver/fb_accel_sti.cpp b/src/driver/fb_accel_sti.cpp index ad9d590d3..ff67528ab 100644 --- a/src/driver/fb_accel_sti.cpp +++ b/src/driver/fb_accel_sti.cpp @@ -332,7 +332,7 @@ void CFbAccelSTi::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_ void CFbAccelSTi::run() { printf(LOGTAG "::run start\n"); - int64_t last_blit = INT64_MAX; /* blit at first iteration */ + int64_t last_blit = 0; blit_pending = false; blit_thread = true; set_threadname("stifb::autoblit"); From d298cee163e5617ee9acfa1d257041a8a9975523 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 24 Sep 2017 16:18:04 +0200 Subject: [PATCH 17/21] netfile: avoid possible buffer overflows spotted by gcc7 * use strcpy instead of sprintf(x, "constant") or sprintf(x, "%s", str) * use strncpy and ensure termination where necessary * use snprintf instead of sprintf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/dea976a9824209f388fee4926ef8b18d7411dca2 Author: Stefan Seyfried Date: 2017-09-24 (Sun, 24 Sep 2017) --- src/driver/netfile.cpp | 59 ++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/src/driver/netfile.cpp b/src/driver/netfile.cpp index 9971c9eab..70483a4d7 100644 --- a/src/driver/netfile.cpp +++ b/src/driver/netfile.cpp @@ -2,7 +2,7 @@ | Neutrino-GUI - DBoxII-Project | | Copyright (C) 2004 by Sanaia -| Copyright (C) 2010-2013 Stefan Seyfried +| Copyright (C) 2010-2013, 2017 Stefan Seyfried | | netfile - remote file access mapper | @@ -140,6 +140,9 @@ known bugs: #undef fseek #endif +/* somewhat safe, 0-terminated sprintf and strcpy */ +#define SPRINTF(a, b...) snprintf(a, sizeof(a)-1, b) +#define STRCPY(a, b) { strncpy(a, b, sizeof(a)-1); a[sizeof(a)-1] = 0; } @@ -178,7 +181,7 @@ magic_t known_magic[] = char err_txt[2048]; /* human readable error message */ char redirect_url[2048]; /* new url if we've been redirected (HTTP 301/302) */ static int debug = 0; /* print debugging output or not */ -static char logfile[255]; /* redirect errors from stderr */ +static char logfile[256]; /* redirect errors from stderr */ static int retry_num = 2 /*10*/; /* number of retries for failed connections */ static int enable_metadata = 0; /* allow shoutcast meta data streaming */ static int got_opts = 0; /* is set to 1 if getOpts() was executed */ @@ -250,7 +253,7 @@ void getOpts() if((ptr = strstr(buf, "logfile="))) { - strcpy(logfile, strchr(ptr, '=') + 1); + STRCPY(logfile, strchr(ptr, '=') + 1); CRLFCut(logfile); freopen(logfile, "w", stderr); } @@ -288,7 +291,7 @@ int ConnectToServer(char *hostname, int port) if(fd == -1) { - strcpy(err_txt, strerror(errno)); + STRCPY(err_txt, strerror(errno)); return -1; } @@ -305,7 +308,7 @@ int ConnectToServer(char *hostname, int port) { if(errno != EINPROGRESS) { close(fd); - strcpy(err_txt, strerror(errno)); + STRCPY(err_txt, strerror(errno)); dprintf(stderr, "error connecting to %s: %s\n", hostname, err_txt); return -1; } @@ -318,7 +321,7 @@ int ConnectToServer(char *hostname, int port) int ret = poll(&pfd, 1, 5000); if(ret != 1) { - strcpy(err_txt, strerror(errno)); + STRCPY(err_txt, strerror(errno)); dprintf(stderr, "error connecting to %s: %s\n", hostname, err_txt); close(fd); return -1; @@ -339,7 +342,7 @@ int ConnectToServer(char *hostname, int port) int request_file(URL *url) { - char str[255], *ptr; + char str[256], *ptr; int slot; ID3 id3; memset(&id3, 0, sizeof(ID3)); @@ -386,18 +389,18 @@ int request_file(URL *url) if (url->logindata[0]) { - sprintf(str, "Authorization: Basic %s\r\n", url->logindata); + SPRINTF(str, "Authorization: Basic %s\r\n", url->logindata); dprintf(stderr, "> %s", str); send(url->fd, str, strlen(str), 0); } - snprintf(str, sizeof(str)-1, "Accept: */*\r\n"); + strcpy(str, "Accept: */*\r\n"); dprintf(stderr, "> %s", str); send(url->fd, str, strlen(str), 0); if(enable_metadata) { - snprintf(str, sizeof(str)-1, "Icy-MetaData: 1\r\n"); + strcpy(str, "Icy-MetaData: 1\r\n"); dprintf(stderr, "> %s", str); send(url->fd, str, strlen(str), 0); } @@ -464,32 +467,32 @@ int request_file(URL *url) int meta_int; CSTATE tmp; - sprintf(str, "GET %s HTTP/1.0\r\n", url->file); + SPRINTF(str, "GET %s HTTP/1.0\r\n", url->file); dprintf(stderr, "> %s", str); send(url->fd, str, strlen(str), 0); - sprintf(str, "Host: %s\r\n", url->host); + SPRINTF(str, "Host: %s\r\n", url->host); dprintf(stderr, "> %s", str); send(url->fd, str, strlen(str), 0); if(enable_metadata) { - sprintf(str, "icy-metadata: 1\r\n"); + strcpy(str, "icy-metadata: 1\r\n"); dprintf(stderr, "> %s", str); send(url->fd, str, strlen(str), 0); } - sprintf(str, "User-Agent: %s\r\n", "RealPlayer/4.0"); + SPRINTF(str, "User-Agent: %s\r\n", "RealPlayer/4.0"); dprintf(stderr, "> %s", str); send(url->fd, str, strlen(str), 0); if (url->logindata[0]) { - sprintf(str, "Authorization: Basic %s\r\n", url->logindata); + SPRINTF(str, "Authorization: Basic %s\r\n", url->logindata); dprintf(stderr, "> %s", str); send(url->fd, str, strlen(str), 0); } - sprintf(str, "\r\n"); /* end of headers to send */ + strcpy(str, "\r\n"); /* end of headers to send */ dprintf(stderr, "> %s", str); send(url->fd, str, strlen(str), 0); @@ -623,14 +626,14 @@ int parse_response(URL *url, void * /*opt*/, CSTATE *state) case 301: /* 'file moved' error */ case 302: /* 'file not found' error */ errno = ENOENT; - strcpy(err_txt, ptr); + STRCPY(err_txt, ptr); getHeaderStr("Location", redirect_url); return -1 * response; break; case 404: /* 'file not found' error */ errno = ENOENT; - strcpy(err_txt, ptr); + STRCPY(err_txt, ptr); return -1; break; @@ -831,7 +834,7 @@ FILE *f_open(const char *filename, const char *acctype) if(ptr) *ptr = 0; - sprintf(url.url, "%s", buf); + STRCPY(url.url, buf); } else return NULL; @@ -907,7 +910,7 @@ FILE *f_open(const char *filename, const char *acctype) /* no free cache slot ? return an error */ if(i == CACHEENTMAX) { - sprintf(err_txt, "no more free cache slots. Too many open files.\n"); + strcpy(err_txt, "no more free cache slots. Too many open files.\n"); return NULL; } @@ -993,9 +996,9 @@ FILE *f_open(const char *filename, const char *acctype) /* create either a shoutcast or an icecast query */ if(url.access_mode == MODE_SCAST) - sprintf(buf2, "http://classic.shoutcast.com/directory/?orderby=listeners&s=%s", url.host); + SPRINTF(buf2, "http://classic.shoutcast.com/directory/?orderby=listeners&s=%s", url.host); else - sprintf(buf2, "http://www.icecast.org/streamlist.php?search=%s", url.host); + SPRINTF(buf2, "http://www.icecast.org/streamlist.php?search=%s", url.host); //findme // ICECAST: it ain't that simple. Icecast doesn't work yet */ @@ -1004,7 +1007,7 @@ FILE *f_open(const char *filename, const char *acctype) if(!_fd) { - sprintf(err_txt, "%s database query failed\nfailed action: %s", + SPRINTF(err_txt, "%s database query failed\nfailed action: %s", ((url.access_mode == MODE_SCAST) ? "shoutcast" : "icecast"), buf2); return NULL; } @@ -1016,17 +1019,17 @@ FILE *f_open(const char *filename, const char *acctype) if(!ptr) { - sprintf(err_txt, "failed to find station number"); + strcpy(err_txt, "failed to find station number"); dprintf(stderr, "%s\n", buf2); return NULL; } - sprintf(url.host, "%d", atoi(ptr + 3)); + SPRINTF(url.host, "%d", atoi(ptr + 3)); } /* create the correct url from the station number */ CRLFCut(url.host); - sprintf(url.url, "http://classic.shoutcast.com/sbin/shoutcast-playlist.pls?rn=%s&file=filename.pls", url.host); + SPRINTF(url.url, "http://classic.shoutcast.com/sbin/shoutcast-playlist.pls?rn=%s&file=filename.pls", url.host); /* fall through */ case MODE_PLS: { @@ -1062,7 +1065,7 @@ FILE *f_open(const char *filename, const char *acctype) if(!ptr) { dprintf(stderr, "Ups! Playlist doesn't seem to contain any URL !\nbuffer:%s\n", buf); - sprintf(err_txt, "Ups! Playlist doesn't seem to contain any URL !"); + strcpy(err_txt, "Ups! Playlist doesn't seem to contain any URL !"); return NULL; } @@ -1089,7 +1092,7 @@ FILE *f_open(const char *filename, const char *acctype) const char* const chptr = strstr(servers[i], "://"); if(chptr) { - sprintf(url.url, "icy%s", chptr); + snprintf(url.url, sizeof(url.url)-1, "icy%s", chptr); fd = f_open(url.url, "r"); } } From 53d0c9cd6dedb2352b434eed1363a3027eaf5397 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 24 Sep 2017 16:19:21 +0200 Subject: [PATCH 18/21] audioplayer: allow to add https:// urls from playlist Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/8c23c8bc5bea9153ce555e97ae597928ce20838c Author: Stefan Seyfried Date: 2017-09-24 (Sun, 24 Sep 2017) --- src/gui/audioplayer.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 9375a4bfc..fa974d149 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -4,7 +4,7 @@ Copyright (C) 2001 Steffen Hehn 'McClean' Copyright (C) 2002-2008 the tuxbox project contributors Copyright (C) 2008 Novell, Inc. Author: Stefan Seyfried - Copyright (C) 2011-2013 Stefan Seyfried + Copyright (C) 2011-2013,2015,2017 Stefan Seyfried Copyright (C) 2017 Sven Hoefer License: GPL @@ -1077,9 +1077,13 @@ void CAudioPlayerGui::processPlaylistUrl(const char *url, const char *name, cons if (line[0] != '#') { //printf("chunk: line = %s\n", line); - ptr = strstr(line, "http://"); - if (ptr != NULL) - { + const char *schemes[] = {"http://", "https://", NULL }; + const char **scheme = schemes; + while (*scheme) { + ptr = strstr(line, *scheme); + scheme++; + if (ptr == NULL) + continue; char *tmp; // strip \n and \r characters from url tmp = strchr(line, '\r'); @@ -1089,6 +1093,7 @@ void CAudioPlayerGui::processPlaylistUrl(const char *url, const char *name, cons if (tmp != NULL) *tmp = '\0'; addUrl2Playlist(ptr, name, tim); + break; } } } From 9b9db123f68c91563884bba787a0e7e90c7227c4 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 24 Sep 2017 16:20:34 +0200 Subject: [PATCH 19/21] radio-stations.xml: clean out nonworking entries Remove all entries that give plain 404 errors or where the host name cannot be resolved. Left in some where the playlist url redirects to unreachable hosts because that might be a temporary failure. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/f2f4496f931eafca52ee564b8c5e31493c37f853 Author: Stefan Seyfried Date: 2017-09-24 (Sun, 24 Sep 2017) --- data/inetradio/radio-stations.xml | 675 ------------------------------ 1 file changed, 675 deletions(-) diff --git a/data/inetradio/radio-stations.xml b/data/inetradio/radio-stations.xml index 629d9f353..065d7d55b 100644 --- a/data/inetradio/radio-stations.xml +++ b/data/inetradio/radio-stations.xml @@ -19,96 +19,6 @@ name="DRadio Wissen" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Date: Sun, 24 Sep 2017 22:14:54 +0200 Subject: [PATCH 20/21] radio-stations.xml: add some Radio BOB! streams Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/bfcf333ea643c9aec3b86ffedbb108a806d041e5 Author: Stefan Seyfried Date: 2017-09-24 (Sun, 24 Sep 2017) --- data/inetradio/radio-stations.xml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/data/inetradio/radio-stations.xml b/data/inetradio/radio-stations.xml index 065d7d55b..1f13e4d83 100644 --- a/data/inetradio/radio-stations.xml +++ b/data/inetradio/radio-stations.xml @@ -19,6 +19,31 @@ name="DRadio Wissen" /> + + + + + + + + + + Date: Sun, 24 Sep 2017 22:17:21 +0200 Subject: [PATCH 21/21] epgview: swap RC_info and RC_help in EPG view this restores old behaviour of RC_info toggling big fonts. RC_help toggles TMDB display (which is disabled by default anyway) Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/c02a97d92ada24f4cd8a7fb53231864f839a8323 Author: Stefan Seyfried Date: 2017-09-24 (Sun, 24 Sep 2017) --- src/gui/epgview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 3bd6e1117..c9608314f 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -1117,7 +1117,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start printf("timerd not available\n"); } break; - case CRCInput::RC_info: + case CRCInput::RC_help: { if (g_settings.tmdb_enabled) { @@ -1200,7 +1200,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start } break; } - case CRCInput::RC_help: + case CRCInput::RC_info: bigFonts = bigFonts ? false : true; ResetModules(); frameBuffer->paintBackgroundBoxRel(sx, sy, ox, oy);