From 306d79d733676f0e77130d362922c8f9c688417f Mon Sep 17 00:00:00 2001 From: GetAway Date: Sun, 21 Jan 2018 20:30:33 +0100 Subject: [PATCH] neutrinoapi.cpp: fix path to iso tab introduced with ff16cbb Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e5d87608528e802746ece1072fb6c060554d46f8 Author: GetAway Date: 2018-01-21 (Sun, 21 Jan 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/nhttpd/tuxboxapi/neutrinoapi.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/nhttpd/tuxboxapi/neutrinoapi.cpp b/src/nhttpd/tuxboxapi/neutrinoapi.cpp index 7fa85786c..d47979b70 100644 --- a/src/nhttpd/tuxboxapi/neutrinoapi.cpp +++ b/src/nhttpd/tuxboxapi/neutrinoapi.cpp @@ -18,6 +18,7 @@ #include #include #include +#include // tuxbox #include @@ -67,10 +68,13 @@ extern CZapitClient::SatelliteList satList; //static std::map iso639; #ifndef initialize_iso639_map +#define ISO_639_TAB DATADIR "/iso-codes/iso-639.tab" +static const char * iso639filename = ISO_639_TAB; + bool _initialize_iso639_map(void) { std::string s, t, u, v; - std::ifstream in("/share/iso-codes/iso-639.tab"); + std::ifstream in(iso639filename); if (in.is_open()) { while (in.peek() == '#') @@ -86,7 +90,10 @@ bool _initialize_iso639_map(void) return true; } else + { + std::cout << "[neutrinoapi.cpp] Loading " << iso639filename << " failed." << std::endl; return false; + } } #endif //-----------------------------------------------------------------------------