From aaca7cba1a8716a62022bbee5f899d76c0c6c662 Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Sun, 9 Mar 2014 16:04:54 +0200 Subject: [PATCH] Fixed installation target bugs (Thanks to Alexander Grothe). --- HISTORY | 8 ++++++++ Makefile | 4 +++- config.c | 7 +++++++ config.h | 3 +++ iptv.c | 5 +++-- po/de_DE.po | 6 +++--- po/fi_FI.po | 6 +++--- po/fr_FR.po | 6 +++--- po/it_IT.po | 6 +++--- po/nl_NL.po | 6 +++--- po/ru_RU.po | 6 +++--- protocolext.c | 2 +- 12 files changed, 43 insertions(+), 22 deletions(-) diff --git a/HISTORY b/HISTORY index c49ea1e..d8f6cb5 100644 --- a/HISTORY +++ b/HISTORY @@ -226,6 +226,10 @@ VDR Plugin 'iptv' Revision History - Made devices to shutdown already in cPluginManager::Stop() to prevent possible crashes while VDR shutdown. +2014-03-09: Version 2.0.3 + +- Fixed installation target bugs (Thanks to Alexander Grothe). + ================================== VDR Plugin 'iptv' Revision History @@ -235,3 +239,7 @@ VDR Plugin 'iptv' Revision History - Added initial CAM support. - Added missing RTSP/UDP support. + +2014-03-09: Version 2.1.1 + +- Fixed installation target bugs (Thanks to Alexander Grothe). diff --git a/Makefile b/Makefile index 74f8b09..48c8b2c 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,7 @@ PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(s LIBDIR = $(call PKGCFG,libdir) LOCDIR = $(call PKGCFG,locdir) PLGCFG = $(call PKGCFG,plgcfg) +RESDIR = $(call PKGCFG,resdir) CFGDIR = $(call PKGCFG,configdir) # TMPDIR ?= /tmp @@ -147,7 +148,8 @@ install-lib: $(SOFILE) install-conf: @mkdir -p $(DESTDIR)$(CFGDIR)/plugins/$(PLUGIN) - @cp -pn $(PLUGIN)/* $(DESTDIR)$(CFGDIR)/plugins/$(PLUGIN)/ + @mkdir -p $(DESTDIR)$(RESDIR)/plugins/$(PLUGIN) + @cp -pn $(PLUGIN)/* $(DESTDIR)$(RESDIR)/plugins/$(PLUGIN)/ install: install-lib install-i18n install-conf diff --git a/config.c b/config.c index 98c5a98..ac9cdf4 100644 --- a/config.c +++ b/config.c @@ -19,6 +19,7 @@ cIptvConfig::cIptvConfig(void) for (unsigned int i = 0; i < ARRAY_SIZE(disabledFiltersM); ++i) disabledFiltersM[i] = -1; memset(configDirectoryM, 0, sizeof(configDirectoryM)); + memset(resourceDirectoryM, 0, sizeof(resourceDirectoryM)); } unsigned int cIptvConfig::GetDisabledFiltersCount(void) const @@ -45,3 +46,9 @@ void cIptvConfig::SetConfigDirectory(const char *directoryP) debug("cIptvConfig::%s(%s)", __FUNCTION__, directoryP); ERROR_IF(!realpath(directoryP, configDirectoryM), "Cannot canonicalize configuration directory"); } + +void cIptvConfig::SetResourceDirectory(const char *directoryP) +{ + debug("cIptvConfig::%s(%s)", __FUNCTION__, directoryP); + ERROR_IF(!realpath(directoryP, resourceDirectoryM), "Cannot canonicalize resource directory"); +} diff --git a/config.h b/config.h index 9ccdd66..37fa317 100644 --- a/config.h +++ b/config.h @@ -21,6 +21,7 @@ private: unsigned int sectionFilteringM; int disabledFiltersM[SECTION_FILTER_TABLE_SIZE]; char configDirectoryM[PATH_MAX]; + char resourceDirectoryM[PATH_MAX]; public: cIptvConfig(); @@ -30,6 +31,7 @@ public: unsigned int GetUseBytes(void) const { return useBytesM; } unsigned int GetSectionFiltering(void) const { return sectionFilteringM; } const char *GetConfigDirectory(void) const { return configDirectoryM; } + const char *GetResourceDirectory(void) const { return resourceDirectoryM; } unsigned int GetDisabledFiltersCount(void) const; int GetDisabledFilters(unsigned int indexP) const; void SetTsBufferSize(unsigned int sizeP) { tsBufferSizeM = sizeP; } @@ -39,6 +41,7 @@ public: void SetSectionFiltering(unsigned int onOffP) { sectionFilteringM = onOffP; } void SetDisabledFilters(unsigned int indexP, int numberP); void SetConfigDirectory(const char *directoryP); + void SetResourceDirectory(const char *directoryP); }; extern cIptvConfig IptvConfig; diff --git a/iptv.c b/iptv.c index e650d1f..03b9a57 100644 --- a/iptv.c +++ b/iptv.c @@ -21,7 +21,7 @@ #define GITVERSION "" #endif - const char VERSION[] = "2.1.0" GITVERSION; + const char VERSION[] = "2.1.1" GITVERSION; static const char DESCRIPTION[] = trNOOP("Experience the IPTV"); class cPluginIptv : public cPlugin { @@ -99,7 +99,8 @@ bool cPluginIptv::Initialize(void) { debug("cPluginIptv::%s()", __FUNCTION__); // Initialize any background activities the plugin shall perform. - IptvConfig.SetConfigDirectory(cPlugin::ResourceDirectory(PLUGIN_NAME_I18N)); + IptvConfig.SetConfigDirectory(cPlugin::ConfigDirectory(PLUGIN_NAME_I18N)); + IptvConfig.SetResourceDirectory(cPlugin::ResourceDirectory(PLUGIN_NAME_I18N)); return cIptvDevice::Initialize(deviceCountM); } diff --git a/po/de_DE.po b/po/de_DE.po index 64fdff9..1ba73af 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-iptv 2.1.0\n" +"Project-Id-Version: vdr-iptv 2.1.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-08 01:18+0200\n" -"PO-Revision-Date: 2014-01-08 01:18+0200\n" +"POT-Creation-Date: 2014-03-09 03:09+0200\n" +"PO-Revision-Date: 2014-03-09 03:09+0200\n" "Last-Translator: Tobias Grimm \n" "Language-Team: German \n" "Language: de\n" diff --git a/po/fi_FI.po b/po/fi_FI.po index 181cf7c..b529b84 100644 --- a/po/fi_FI.po +++ b/po/fi_FI.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-iptv 2.1.0\n" +"Project-Id-Version: vdr-iptv 2.1.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-08 01:18+0200\n" -"PO-Revision-Date: 2014-01-08 01:18+0200\n" +"POT-Creation-Date: 2014-03-09 03:09+0200\n" +"PO-Revision-Date: 2014-03-09 03:09+0200\n" "Last-Translator: Rolf Ahrenberg\n" "Language-Team: Finnish \n" "Language: fi\n" diff --git a/po/fr_FR.po b/po/fr_FR.po index 2e7b40c..188da1a 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -6,10 +6,10 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-iptv 2.1.0\n" +"Project-Id-Version: vdr-iptv 2.1.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-08 01:18+0200\n" -"PO-Revision-Date: 2014-01-08 01:18+0200\n" +"POT-Creation-Date: 2014-03-09 03:09+0200\n" +"PO-Revision-Date: 2014-03-09 03:09+0200\n" "Last-Translator: NIVAL Michaƫl \n" "Language-Team: French \n" "Language: fr\n" diff --git a/po/it_IT.po b/po/it_IT.po index 626fa69..d77d38c 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-iptv 2.1.0\n" +"Project-Id-Version: vdr-iptv 2.1.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-08 01:18+0200\n" -"PO-Revision-Date: 2014-01-08 01:18+0200\n" +"POT-Creation-Date: 2014-03-09 03:09+0200\n" +"PO-Revision-Date: 2014-03-09 03:09+0200\n" "Last-Translator: Diego Pierotto \n" "Language-Team: Italian \n" "Language: it\n" diff --git a/po/nl_NL.po b/po/nl_NL.po index f852afa..5761805 100644 --- a/po/nl_NL.po +++ b/po/nl_NL.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-iptv 2.1.0\n" +"Project-Id-Version: vdr-iptv 2.1.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-08 01:18+0200\n" -"PO-Revision-Date: 2014-01-08 01:18+0200\n" +"POT-Creation-Date: 2014-03-09 03:09+0200\n" +"PO-Revision-Date: 2014-03-09 03:09+0200\n" "Last-Translator: Carel\n" "Language-Team: Dutch \n" "Language: nl\n" diff --git a/po/ru_RU.po b/po/ru_RU.po index e780cad..49674fc 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-iptv 2.1.0\n" +"Project-Id-Version: vdr-iptv 2.1.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-08 01:18+0200\n" -"PO-Revision-Date: 2014-01-08 01:18+0200\n" +"POT-Creation-Date: 2014-03-09 03:09+0200\n" +"PO-Revision-Date: 2014-03-09 03:09+0200\n" "Last-Translator: Alexander Gross \n" "Language-Team: Russian \n" "Language: ru\n" diff --git a/protocolext.c b/protocolext.c index 3e91932..59d69d3 100644 --- a/protocolext.c +++ b/protocolext.c @@ -158,7 +158,7 @@ bool cIptvProtocolExt::SetSource(const char* locationP, const int parameterP, co if (!isempty(locationP)) { struct stat stbuf; // Update script file and parameter - scriptFileM = cString::sprintf("%s/%s", IptvConfig.GetConfigDirectory(), locationP); + scriptFileM = cString::sprintf("%s/%s", IptvConfig.GetResourceDirectory(), locationP); if ((stat(*scriptFileM, &stbuf) != 0) || (strstr(*scriptFileM, "..") != 0)) { error("Non-existent or relative path script '%s'", *scriptFileM); return false;