From 17c12418ec3336e1a550f5ea71d7ecb9e40da1cc Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 1 Feb 2012 13:00:25 +0000 Subject: [PATCH] sectionsd: remove never used var &6 init var git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2080 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/369e67d26c37d0a1f2f233d6a5e0388a7c55a753 Author: Jacek Jendrzej Date: 2012-02-01 (Wed, 01 Feb 2012) ------------------ This commit was generated by Migit --- src/sectionsd/SIevents.cpp | 6 ++++-- src/sectionsd/SIevents.hpp | 1 + src/sectionsd/SIsections.cpp | 8 ++++---- src/sectionsd/SIservices.hpp | 1 + src/sectionsd/sectionsd.cpp | 16 +++++----------- 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/sectionsd/SIevents.cpp b/src/sectionsd/SIevents.cpp index bc18c0ada..28808a185 100644 --- a/src/sectionsd/SIevents.cpp +++ b/src/sectionsd/SIevents.cpp @@ -81,6 +81,7 @@ SIevent::SIevent(const t_original_network_id _original_network_id, const t_trans eventID = _event_id; table_id = 0xFF; /* not set */ version = 0xFF; + running = 0; /* contentClassification = ""; userClassification = ""; itemDescription = ""; @@ -336,7 +337,7 @@ void SIevent::dump(void) const for_each(ratings.begin(), ratings.end(), printSIparentalRating()); for_each(linkage_descs.begin(), linkage_descs.end(), printSIlinkage()); } - +#if 0 void SIevent::dumpSmall(void) const { for (std::map::const_iterator it = langName.begin() ; @@ -358,6 +359,7 @@ void SIevent::dumpSmall(void) const for_each(ratings.begin(), ratings.end(), printSIparentalRating()); for_each(linkage_descs.begin(), linkage_descs.end(), printSIlinkage()); } +#endif /* // Liest n Bytes aus einem Socket per read inline int readNbytes(int fd, char *buf, int n) @@ -520,7 +522,7 @@ void SIevents::removeOldEvents(long seconds) // Set has the important property that inserting a new element into a set does not // invalidate iterators that point to existing elements. - if (copy_of_event.times.size() != 0) + if (!copy_of_event.times.empty()) #ifdef DEBUG assert((++insert(it, copy_of_event)) == it); #else diff --git a/src/sectionsd/SIevents.hpp b/src/sectionsd/SIevents.hpp index 679fe881f..962da26b2 100644 --- a/src/sectionsd/SIevents.hpp +++ b/src/sectionsd/SIevents.hpp @@ -355,6 +355,7 @@ public: vps = 0; table_id = 0xFF; /* 0xFF means "not set" */ version = 0xFF; + running = 0; // dauer=0; // startzeit=0; } diff --git a/src/sectionsd/SIsections.cpp b/src/sectionsd/SIsections.cpp index 3c9a5d722..fa5d7aa43 100644 --- a/src/sectionsd/SIsections.cpp +++ b/src/sectionsd/SIsections.cpp @@ -91,7 +91,7 @@ struct service_list_entry { unsigned service_id_lo : 8; unsigned service_type : 8; } __attribute__ ((packed)) ; - +#if 0 struct digplus_order_entry { unsigned service_id_hi : 8; unsigned service_id_lo : 8; @@ -115,7 +115,7 @@ struct bskyb_bid { unsigned unknown1 : 8; unsigned unknown2 : 8; } __attribute__ ((packed)) ; - +#endif struct private_data_specifier { unsigned byte1 : 8; unsigned byte2 : 8; @@ -1510,13 +1510,13 @@ int SIsections :: readSections(const unsigned short pid, const unsigned char fil // Jetzt erstellen wir eine Liste der fehlenden Sections unsigned short actualTableIDextension = (unsigned short) -1; unsigned char actualTableID = (unsigned char) -1; - unsigned char maxNr = 0; +// unsigned char maxNr = 0; unsigned char lastNr = 0; for (SIsections::iterator k = begin(); k != end(); k++) { if ((k->tableIDextension() != actualTableIDextension) || (k->tableID() != actualTableID)) { // Neue Table-ID-Extension - maxNr = k->lastSectionNumber(); +// maxNr = k->lastSectionNumber(); actualTableIDextension = k->tableIDextension(); actualTableID = k->tableID(); } diff --git a/src/sectionsd/SIservices.hpp b/src/sectionsd/SIservices.hpp index 1baae63ab..07d4894ae 100644 --- a/src/sectionsd/SIservices.hpp +++ b/src/sectionsd/SIservices.hpp @@ -137,6 +137,7 @@ public: original_network_id = _original_network_id; transport_stream_id = _transport_stream_id; serviceTyp=0; + is_actual =0; memset(&flags, 0, sizeof(flags)); } // Std-Copy diff --git a/src/sectionsd/sectionsd.cpp b/src/sectionsd/sectionsd.cpp index c116d6aa0..0849cdd59 100644 --- a/src/sectionsd/sectionsd.cpp +++ b/src/sectionsd/sectionsd.cpp @@ -803,7 +803,7 @@ static void addEvent(const SIevent &evt, const time_t zeit, bool cn = false) on one German Sky channel and incomplete on another one. So we make sure to keep the complete event, if applicable. */ - if ((already_exists) && (evt.components.size() > 0)) { + if ((already_exists) && ( !evt.components.empty() )) { if (si->second->components.size() != evt.components.size()) already_exists = false; else { @@ -823,7 +823,7 @@ static void addEvent(const SIevent &evt, const time_t zeit, bool cn = false) } } - if ((already_exists) && (evt.linkage_descs.size() > 0)) { + if ((already_exists) && ( !evt.linkage_descs.empty() )) { if (si->second->linkage_descs.size() != evt.linkage_descs.size()) already_exists = false; else { @@ -843,7 +843,7 @@ static void addEvent(const SIevent &evt, const time_t zeit, bool cn = false) } } - if ((already_exists) && (evt.ratings.size() > 0)) { + if ((already_exists) && ( !evt.ratings.empty() )) { if (si->second->ratings.size() != evt.ratings.size()) already_exists = false; else { @@ -2296,14 +2296,14 @@ static void findPrevNextSIevent(const event_id_t uniqueKey, SItime &zeit, SIeven // connection-thread // handles incoming requests //--------------------------------------------------------------------- - +#if 0 struct connectionData { int connectionSocket; struct sockaddr_in clientAddr; }; - +#endif static void commandPauseScanning(int connfd, char *data, const unsigned dataLength) { if (dataLength != 4) @@ -9443,7 +9443,6 @@ static void *cnThread(void *) t_channel_id uniqueOld = 0; bool found_already = false; time_t azeit = time(NULL); - std::string sname; if(tv_mode) { serviceTyp1 = 0x01; @@ -9471,7 +9470,6 @@ static void *cnThread(void *) { if (s->second->serviceTyp == serviceTyp1 || (serviceTyp2 && s->second->serviceTyp == serviceTyp2)) { - sname = s->second->serviceName; found_already = false; } } @@ -9488,10 +9486,6 @@ static void *cnThread(void *) if ( !found_already ) { - std::string eName = (*e)->getName(); - std::string eText = (*e)->getText(); - std::string eExtendedText = (*e)->getExtendedText(); - for (SItimes::iterator t = (*e)->times.begin(); t != (*e)->times.end(); ++t) { if (t->startzeit <= azeit && azeit <= (long)(t->startzeit + t->dauer))