From 43a0b38185cdcb015ceb6ed45a3b23431ef7c6fd Mon Sep 17 00:00:00 2001 From: TangoCash Date: Mon, 13 Nov 2017 22:28:54 +0100 Subject: [PATCH] armbox: read frontend real names Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/20bf14d02f2e791afb91deac7bf4db80c0e3e681 Author: TangoCash Date: 2017-11-13 (Mon, 13 Nov 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/zapit/src/frontend.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index dbaaff947..d9580e5c6 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -28,8 +28,10 @@ #include #include #include +#include /* zapit */ #include +#include #include #include #include @@ -252,6 +254,7 @@ bool CFrontend::Open(bool init) } getFEInfo(); + } currentTransponder.setTransponderId(0); @@ -274,6 +277,30 @@ void CFrontend::getFEInfo(void) printf("[fe%d] frontend fd %d type %d\n", fenumber, fd, info.type); bool legacy = true; +#if HAVE_ARM_HARDWARE + std::ifstream in; + in.open("/proc/bus/nim_sockets"); + if (in.is_open()) + { + std::string line; + bool found = false; + while (getline(in, line)) + { + if (line.find("NIM Socket "+to_string(fenumber)+":") !=std::string::npos) + found = true; + + if ((line.find("Name:") != std::string::npos) && found) + { + //printf("NIM SOCKET: %s\n",line.substr(line.find_first_of(":")+2).c_str()); + std::string tmp = info.name; + sprintf(info.name,"%s (%s)",tmp.c_str(),line.substr(line.find_first_of(":")+2).c_str()); + break; + } + } + in.close(); + } +#endif // HAVE_ARM_HARDWARE + deliverySystemMask = UNKNOWN_DS; #if (DVB_API_VERSION >= 5) && (DVB_API_VERSION_MINOR >= 5)