Project "Tuxbox-GIT: apps": The branch, master has been updated via e70a0996a1231a870579c2a3278c494e2e9d84c1 (commit) via 4a2dfcf1b109e5b5053470be8cf42cdc951012c0 (commit) via ea6d7b00a6c2da2fbed517b3943453e8b8f1bd0f (commit) via d2e38e6015aba76d533e01b18532cf86c98cf4ef (commit) from 4321a0a23cc7315cf644759bbf9e7a917d367e97 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e70a0996a1231a870579c2a3278c494e2e9d84c1 Author: Stefan Seyfried <se...@tuxbox-git.slipkontur.de> Date: Tue May 28 20:41:22 2013 +0200 Neutrino audioplayer: avoid out-of-bounds access Signed-off-by: Christian Schuett <gaucho...@hotmail.com> diff --git a/tuxbox/neutrino/src/gui/audioplayer.cpp b/tuxbox/neutrino/src/gui/audioplayer.cpp index a517a42..0a524a3 100644 --- a/tuxbox/neutrino/src/gui/audioplayer.cpp +++ b/tuxbox/neutrino/src/gui/audioplayer.cpp @@ -1297,13 +1297,13 @@ bool CAudioPlayerGui::openFilebrowser(void) while (infile.good()) { infile.getline(cLine, 255); - // remove CR - if(cLine[strlen(cLine)-1]=='\r') - cLine[strlen(cLine)-1]=0; int duration; sscanf(cLine, "#EXTINF:%d,%[^\n]\n", &duration, name); if(strlen(cLine) > 0 && cLine[0]!='#') { + // remove CR + if(cLine[strlen(cLine)-1]=='\r') + cLine[strlen(cLine)-1]=0; char *url = strstr(cLine, "http://"); if (url != NULL) { if (strstr(url, ".m3u") || strstr(url, ".pls")) commit 4a2dfcf1b109e5b5053470be8cf42cdc951012c0 Author: Jacek Jendrzej <crash...@googlemail.com> Date: Tue May 28 20:37:25 2013 +0200 Neutrino: fix comma at end of enumerator list Signed-off-by: Christian Schuett <gaucho...@hotmail.com> diff --git a/tuxbox/neutrino/src/gui/filebrowser.cpp b/tuxbox/neutrino/src/gui/filebrowser.cpp index cb5ccc3..2eb90ff 100644 --- a/tuxbox/neutrino/src/gui/filebrowser.cpp +++ b/tuxbox/neutrino/src/gui/filebrowser.cpp @@ -257,12 +257,11 @@ void SMSKeyInput::setTimeout(int timeout) //------------------------------------------------------------------------ -//------------------------------------------------------------------------ bool comparetolower(const char a, const char b) { return tolower(a) < tolower(b); -}; +} // sort operators bool sortByName (const CFile& a, const CFile& b) diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp b/tuxbox/neutrino/src/gui/moviebrowser.cpp index f928638..0aa319e 100644 --- a/tuxbox/neutrino/src/gui/moviebrowser.cpp +++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp @@ -242,7 +242,7 @@ bool sortDirection = 0; bool compare_to_lower(const char a, const char b) { return tolower(a) < tolower(b); -}; +} // sort operators bool sortByTitle (const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b) @@ -440,7 +440,7 @@ void CMovieBrowser::fileInfoStale(void) m_FilterLines.lineArray[i].clear(); } -}; +} /************************************************************************ @@ -3685,7 +3685,7 @@ CMenuSelector::CMenuSelector(const char * OptionName, const bool Active , char * active = Active; returnIntValue = ReturnIntValue; returnInt = ReturnInt; -}; +} CMenuSelector::CMenuSelector(const char * OptionName, const bool Active , std::string& OptionValue, int* ReturnInt ,int ReturnIntValue ) : CMenuItem() { @@ -3697,7 +3697,7 @@ CMenuSelector::CMenuSelector(const char * OptionName, const bool Active , std::s active = Active; returnIntValue = ReturnIntValue; returnInt = ReturnInt; -}; +} int CMenuSelector::getHeight(void) const { @@ -3717,7 +3717,7 @@ int CMenuSelector::exec(CMenuTarget* /*parent*/) *optionValueString = optionName; } return menu_return::RETURN_EXIT; -}; +} int CMenuSelector::paint(bool selected) { @@ -3802,7 +3802,7 @@ CDirMenu::CDirMenu(std::vector<MB_DIR>* dir_list) } } } -}; +} /************************************************************************/ int CDirMenu::exec(CMenuTarget* parent, const std::string & actionKey) diff --git a/tuxbox/neutrino/src/gui/network_setup.h b/tuxbox/neutrino/src/gui/network_setup.h index 615188d..cb0fc24 100644 --- a/tuxbox/neutrino/src/gui/network_setup.h +++ b/tuxbox/neutrino/src/gui/network_setup.h @@ -76,19 +76,19 @@ class CNetworkSetup : public CMenuTarget, CChangeObserver enum NETWORK_DHCP_MODE { NETWORK_DHCP_OFF = 0, //static - NETWORK_DHCP_ON = 1, + NETWORK_DHCP_ON = 1 }; enum NETWORK_START_MODE { NETWORK_AUTOSTART_OFF = 0, - NETWORK_AUTOSTART_ON = 1, + NETWORK_AUTOSTART_ON = 1 }; enum NETWORK_NTP_MODE { NETWORK_NTP_OFF = 0, - NETWORK_NTP_ON = 1, + NETWORK_NTP_ON = 1 }; CNetworkSetup(); diff --git a/tuxbox/neutrino/src/system/fsmounter.cpp b/tuxbox/neutrino/src/system/fsmounter.cpp index 22aab90..334d492 100644 --- a/tuxbox/neutrino/src/system/fsmounter.cpp +++ b/tuxbox/neutrino/src/system/fsmounter.cpp @@ -169,15 +169,11 @@ bool CFSMounter::isMounted(const char * const local_dir) if (local_dir == NULL) return false; - // according to the man page realpath() sucks, but there's nothing better :( - int path_max = 0; - #ifdef PATH_MAX - path_max = PATH_MAX; + char mount_point[PATH_MAX]; #else - path_max = 4096; + char mount_point[4096]; #endif - char mount_point[path_max]; if (realpath(local_dir, mount_point) == NULL) { printf("[CFSMounter] could not resolve dir: %s: %s\n",local_dir, strerror(errno)); return false; commit ea6d7b00a6c2da2fbed517b3943453e8b8f1bd0f Author: Jacek Jendrzej <crash...@googlemail.com> Date: Fri May 17 23:23:04 2013 +0200 Neutrino event search: add search all epg option Signed-off-by: Christian Schuett <gaucho...@hotmail.com> diff --git a/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp b/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp index bb6f958..03a7886 100644 --- a/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp @@ -2410,27 +2410,26 @@ static void sendAllEvents(int connfd, t_channel_id serviceUniqueKey, bool oldFor serviceIDfound = 1; bool copy = true; - if(search == 0); // nothing to do here - else if(search == 1) + if (search) { - std::string eName = (*e)->getName(); - std::transform(eName.begin(), eName.end(), eName.begin(), tolower); - if(eName.find(search_text) == std::string::npos) - copy = false; - } - else if(search == 2) - { - std::string eText = (*e)->getText(); - std::transform(eText.begin(), eText.end(), eText.begin(), tolower); - if(eText.find(search_text) == std::string::npos) - copy = false; - } - else if(search == 3) - { - std::string eExtendedText = (*e)->getExtendedText(); - std::transform(eExtendedText.begin(), eExtendedText.end(), eExtendedText.begin(), tolower); - if(eExtendedText.find(search_text) == std::string::npos) - copy = false; + if ((search == 1 /*EventList::SEARCH_EPG_TITLE*/) || (search == 5 /*EventList::SEARCH_EPG_ALL*/)) + { + std::string eName = (*e)->getName(); + std::transform(eName.begin(), eName.end(), eName.begin(), tolower); + copy = (eName.find(search_text) != std::string::npos); + } + if ((search == 2 /*EventList::SEARCH_EPG_INFO1*/) || (!copy && (search == 5 /*EventList::SEARCH_EPG_ALL*/))) + { + std::string eText = (*e)->getText(); + std::transform(eText.begin(), eText.end(), eText.begin(), tolower); + copy = (eText.find(search_text) != std::string::npos); + } + if ((search == 3 /*EventList::SEARCH_EPG_INFO2*/) || (!copy && (search == 5 /*EventList::SEARCH_EPG_ALL*/))) + { + std::string eExtendedText = (*e)->getExtendedText(); + std::transform(eExtendedText.begin(), eExtendedText.end(), eExtendedText.begin(), tolower); + copy = (eExtendedText.find(search_text) != std::string::npos); + } } if(copy) diff --git a/tuxbox/neutrino/data/locale/deutsch.locale b/tuxbox/neutrino/data/locale/deutsch.locale index 7e39eb3..71246d0 100644 --- a/tuxbox/neutrino/data/locale/deutsch.locale +++ b/tuxbox/neutrino/data/locale/deutsch.locale @@ -425,6 +425,7 @@ esound.port Esound Port eventfinder.head Stichwortsuche im EPG eventfinder.keyword Suchbegriff eventfinder.search Suche +eventfinder.search_all_epg Alle EPG-Daten eventfinder.search_within_epg Suche in eventfinder.search_within_list Suche in eventfinder.searching Suche Stichwort in EPG ... diff --git a/tuxbox/neutrino/data/locale/english.locale b/tuxbox/neutrino/data/locale/english.locale index c3077fc..1c5bda4 100644 --- a/tuxbox/neutrino/data/locale/english.locale +++ b/tuxbox/neutrino/data/locale/english.locale @@ -425,6 +425,7 @@ esound.port Esound Port eventfinder.head Search in EPG eventfinder.keyword Keyword eventfinder.search Search +eventfinder.search_all_epg All EPG data eventfinder.search_within_epg Search within eventfinder.search_within_list Search within eventfinder.searching Search for keyword in EPG... diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp index a42a273..bf94337 100644 --- a/tuxbox/neutrino/src/gui/eventlist.cpp +++ b/tuxbox/neutrino/src/gui/eventlist.cpp @@ -1061,14 +1061,15 @@ int CEventListHandler::exec(CMenuTarget* parent, const std::string &/*actionkey* /************************************************************************************************ * class CEventFinderMenu ************************************************************************************************/ -#define SEARCH_EPG_OPTION_COUNT 3 +#define SEARCH_EPG_OPTION_COUNT 4 const CMenuOptionChooser::keyval SEARCH_EPG_OPTIONS[SEARCH_EPG_OPTION_COUNT] = { // { EventList::SEARCH_EPG_NONE, LOCALE_PICTUREVIEWER_RESIZE_NONE }, { EventList::SEARCH_EPG_TITLE, LOCALE_FONTSIZE_EPG_TITLE }, { EventList::SEARCH_EPG_INFO1, LOCALE_FONTSIZE_EPG_INFO1 }, - { EventList::SEARCH_EPG_INFO2, LOCALE_FONTSIZE_EPG_INFO2 } -// ,{ EventList::SEARCH_EPG_GENRE, LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR } + { EventList::SEARCH_EPG_INFO2, LOCALE_FONTSIZE_EPG_INFO2 }, +// { EventList::SEARCH_EPG_GENRE, LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR }, + { EventList::SEARCH_EPG_ALL, LOCALE_EVENTFINDER_SEARCH_ALL_EPG } }; #define SEARCH_LIST_OPTION_COUNT 3 diff --git a/tuxbox/neutrino/src/system/locals.h b/tuxbox/neutrino/src/system/locals.h index 38d5980..2e09f3e 100644 --- a/tuxbox/neutrino/src/system/locals.h +++ b/tuxbox/neutrino/src/system/locals.h @@ -452,6 +452,7 @@ typedef enum LOCALE_EVENTFINDER_HEAD, LOCALE_EVENTFINDER_KEYWORD, LOCALE_EVENTFINDER_SEARCH, + LOCALE_EVENTFINDER_SEARCH_ALL_EPG, LOCALE_EVENTFINDER_SEARCH_WITHIN_EPG, LOCALE_EVENTFINDER_SEARCH_WITHIN_LIST, LOCALE_EVENTFINDER_SEARCHING, diff --git a/tuxbox/neutrino/src/system/locals_intern.h b/tuxbox/neutrino/src/system/locals_intern.h index 878f988..828bb62 100644 --- a/tuxbox/neutrino/src/system/locals_intern.h +++ b/tuxbox/neutrino/src/system/locals_intern.h @@ -452,6 +452,7 @@ const char * locale_real_names[] = "eventfinder.head", "eventfinder.keyword", "eventfinder.search", + "eventfinder.search_all_epg", "eventfinder.search_within_epg", "eventfinder.search_within_list", "eventfinder.searching", commit d2e38e6015aba76d533e01b18532cf86c98cf4ef Author: Christian Schuett <gaucho...@hotmail.com> Date: Wed May 15 19:25:20 2013 +0200 Neutrino event list: disable removal of duplicates from search results removal of duplicates is not needed anymore because we are now searching in a unique channel list, where duplicates are impossible Signed-off-by: Christian Schuett <gaucho...@hotmail.com> diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp index 28d0dd6..a42a273 100644 --- a/tuxbox/neutrino/src/gui/eventlist.cpp +++ b/tuxbox/neutrino/src/gui/eventlist.cpp @@ -82,10 +82,12 @@ static bool sortByDateTime (const CChannelEvent& a, const CChannelEvent& b) } // unique operators +#if 0 bool uniqueByIdAndDateTime (const CChannelEvent& a, const CChannelEvent& b) { return (a.eventID == b.eventID && a.startTime == b.startTime); } +#endif EventList::EventList() { @@ -981,6 +983,7 @@ int EventList::findEvents(void) v.push_back(channel_id); } } + // search in unique channel list => duplicate events impossible sort(v.begin(), v.end()); std::vector<t_channel_id>::iterator last_it = unique(v.begin(), v.end()); std::vector<t_channel_id>::iterator it; @@ -990,7 +993,10 @@ int EventList::findEvents(void) } sort_mode = 0; sort(evtlist.begin(),evtlist.end(),sortByDateTime); +#if 0 + // remove duplicates evtlist.resize(unique(evtlist.begin(), evtlist.end(), uniqueByIdAndDateTime) - evtlist.begin()); +#endif current_event = (unsigned int)-1; time_t azeit=time(NULL); ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp | 39 +++++++++++------------ tuxbox/neutrino/data/locale/deutsch.locale | 1 + tuxbox/neutrino/data/locale/english.locale | 1 + tuxbox/neutrino/src/gui/audioplayer.cpp | 6 ++-- tuxbox/neutrino/src/gui/eventlist.cpp | 13 ++++++-- tuxbox/neutrino/src/gui/filebrowser.cpp | 3 +- tuxbox/neutrino/src/gui/moviebrowser.cpp | 12 +++--- tuxbox/neutrino/src/gui/network_setup.h | 6 ++-- tuxbox/neutrino/src/system/fsmounter.cpp | 8 +--- tuxbox/neutrino/src/system/locals.h | 1 + tuxbox/neutrino/src/system/locals_intern.h | 1 + 11 files changed, 48 insertions(+), 43 deletions(-) -- Tuxbox-GIT: apps ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j _______________________________________________ Tuxbox-cvs-commits mailing list Tuxbox-cvs-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tuxbox-cvs-commits