[SCM] vdr-plugin-vnsiserver/master: Imported patches from upstream git up to SHA 2c42df3

tiber-guest at users.alioth.debian.org tiber-guest at users.alioth.debian.org
Wed Jul 5 20:40:54 UTC 2017


The following commit has been merged in the master branch:
commit 07ccc1f531a1f1b2b5b6d68ba085047542aacfeb
Author: Tobias Grimm <etobi at debian.org>
Date:   Sun Jun 25 16:03:53 2017 +0200

    Imported patches from upstream git up to SHA 2c42df3

diff --git a/debian/patches/0001-Fix-building-against-musl-C-library.patch b/debian/patches/0001-Fix-building-against-musl-C-library.patch
new file mode 100644
index 0000000..57cdec4
--- /dev/null
+++ b/debian/patches/0001-Fix-building-against-musl-C-library.patch
@@ -0,0 +1,25 @@
+From dd743c225c9d7c1e18872cfdde2fce8f13b25109 Mon Sep 17 00:00:00 2001
+From: glenvt18 <glenvt18 at gmail.com>
+Date: Tue, 31 Jan 2017 16:17:24 +0300
+Subject: [PATCH 1/6] Fix building against musl C library
+
+---
+ vnsiosd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vnsiosd.c b/vnsiosd.c
+index e455025..5f40780 100644
+--- a/vnsiosd.c
++++ b/vnsiosd.c
+@@ -29,7 +29,7 @@
+ #include "vnsi.h"
+ #include <signal.h>
+ #include <sys/ioctl.h>
+-#include <sys/unistd.h>
++#include <unistd.h>
+ #include <vdr/tools.h>
+ #include <vdr/remote.h>
+ #include "cxsocket.h"
+-- 
+2.11.0
+
diff --git a/debian/patches/0002-make-grouping-of-series-recordings-configurable.patch b/debian/patches/0002-make-grouping-of-series-recordings-configurable.patch
new file mode 100644
index 0000000..d9762d6
--- /dev/null
+++ b/debian/patches/0002-make-grouping-of-series-recordings-configurable.patch
@@ -0,0 +1,158 @@
+From aef3380bad579f5ec3bf72f2925572c58f5a2007 Mon Sep 17 00:00:00 2001
+From: Rainer Hochecker <fernetmenta at online.de>
+Date: Sat, 25 Feb 2017 17:42:51 +0100
+Subject: [PATCH 2/6] make grouping of series recordings configurable
+
+---
+ setup.c       |  6 ++++++
+ setup.h       |  1 +
+ vnsi.c        |  5 ++++-
+ vnsi.h        |  1 +
+ vnsiclient.c  | 42 +++++++++++++++++++++++-------------------
+ vnsicommand.h |  1 +
+ 6 files changed, 36 insertions(+), 20 deletions(-)
+
+diff --git a/setup.c b/setup.c
+index 008122d..9d2f5fc 100644
+--- a/setup.c
++++ b/setup.c
+@@ -31,6 +31,7 @@ int TimeshiftBufferSize = 5;
+ int TimeshiftBufferFileSize = 6;
+ char TimeshiftBufferDir[PATH_MAX] = "\0";
+ int PlayRecording = 0;
++int GroupRecordings = 1;
+ int AvoidEPGScan = 1;
+ int DisableScrambleTimeout = 0;
+ int DisableCamBlacklist = 0;
+@@ -55,6 +56,9 @@ cMenuSetupVNSI::cMenuSetupVNSI(void)
+   newPlayRecording = PlayRecording;
+   Add(new cMenuEditBoolItem( tr("Play Recording instead of live"), &newPlayRecording));
+ 
++  newGroupRecordings = GroupRecordings;
++  Add(new cMenuEditBoolItem( tr("Group series recordings"), &newGroupRecordings));
++
+   newAvoidEPGScan = AvoidEPGScan;
+   Add(new cMenuEditBoolItem( tr("Avoid EPG scan while streaming"), &newAvoidEPGScan));
+ 
+@@ -94,6 +98,8 @@ void cMenuSetupVNSI::Store(void)
+ 
+   SetupStore(CONFNAME_PLAYRECORDING, PlayRecording = newPlayRecording);
+ 
++  SetupStore(CONFNAME_GROUPRECORDINGS, GroupRecordings = newGroupRecordings);
++
+   SetupStore(CONFNAME_AVOIDEPGSCAN, AvoidEPGScan = newAvoidEPGScan);
+ 
+   SetupStore(CONFNAME_DISABLESCRAMBLETIMEOUT, DisableScrambleTimeout = newDisableScrambleTimeout);
+diff --git a/setup.h b/setup.h
+index e37ad10..9964179 100644
+--- a/setup.h
++++ b/setup.h
+@@ -37,6 +37,7 @@ private:
+   int newTimeshiftBufferFileSize;
+   char newTimeshiftBufferDir[PATH_MAX];
+   int newPlayRecording;
++  int newGroupRecordings;
+   int newAvoidEPGScan;
+   int newDisableScrambleTimeout;
+   int newDisableCamBlacklist;
+diff --git a/vnsi.c b/vnsi.c
+index e3541ee..6037b5f 100644
+--- a/vnsi.c
++++ b/vnsi.c
+@@ -154,8 +154,11 @@ bool cPluginVNSIServer::SetupParse(const char *Name, const char *Value)
+     if (*TimeshiftBufferDir && TimeshiftBufferDir[strlen(TimeshiftBufferDir)-1] == '/')
+       /* strip trailing slash */
+       TimeshiftBufferDir[strlen(TimeshiftBufferDir)-1] = 0;
+-  } else if (!strcasecmp(Name, CONFNAME_PLAYRECORDING))
++  }
++  else if (!strcasecmp(Name, CONFNAME_PLAYRECORDING))
+     PlayRecording = atoi(Value);
++  else if (!strcasecmp(Name, CONFNAME_GROUPRECORDINGS))
++    GroupRecordings = atoi(Value);
+   else if (!strcasecmp(Name, CONFNAME_AVOIDEPGSCAN))
+     AvoidEPGScan = atoi(Value);
+   else if (!strcasecmp(Name, CONFNAME_DISABLESCRAMBLETIMEOUT))
+diff --git a/vnsi.h b/vnsi.h
+index 3a62432..f92b016 100644
+--- a/vnsi.h
++++ b/vnsi.h
+@@ -37,6 +37,7 @@ extern int TimeshiftBufferSize;
+ extern int TimeshiftBufferFileSize;
+ extern char TimeshiftBufferDir[PATH_MAX];
+ extern int PlayRecording;
++extern int GroupRecordings;
+ extern int AvoidEPGScan;
+ extern int DisableScrambleTimeout;
+ extern int DisableCamBlacklist;
+diff --git a/vnsiclient.c b/vnsiclient.c
+index 1858f61..c2a95a1 100644
+--- a/vnsiclient.c
++++ b/vnsiclient.c
+@@ -2179,29 +2179,33 @@ bool cVNSIClient::processRECORDINGS_GetList(cRequestPacket &req) /* OPCODE 102 *
+     std::string strDirectory;
+     if (directory)
+       strDirectory = directory;
+-    int noOfEntries = 1;
+-    char* filename = strdup(recording->FileName());
+-    char *pch = strrchr(filename, '/');
+-    if (pch)
++
++    if (GroupRecordings)
+     {
+-      int noOfRecs = 0;
+-      *pch = 0;
+-      char* foldername = filename;
+-      struct dirent **fileListTemp;
+-      noOfEntries = scandir(foldername, &fileListTemp, NULL, alphasort);
+-      for (int i=0; i<noOfEntries; i++)
+-      {
+-        std::string name(fileListTemp[i]->d_name);
+-        if (name.find(".rec") != std::string::npos)
+-          noOfRecs++;
+-      }
+-      if (noOfRecs > 1)
++      int noOfEntries = 1;
++      char* filename = strdup(recording->FileName());
++      char *pch = strrchr(filename, '/');
++      if (pch)
+       {
+-        strDirectory += "/";
+-        strDirectory += recname;
++        int noOfRecs = 0;
++        *pch = 0;
++        char* foldername = filename;
++        struct dirent **fileListTemp;
++        noOfEntries = scandir(foldername, &fileListTemp, NULL, alphasort);
++        for (int i=0; i<noOfEntries; i++)
++        {
++          std::string name(fileListTemp[i]->d_name);
++          if (name.find(".rec") != std::string::npos)
++            noOfRecs++;
++        }
++        if (noOfRecs > 1)
++        {
++          strDirectory += "/";
++          strDirectory += recname;
++        }
+       }
++      free(filename);
+     }
+-    free(filename);
+ 
+     resp.add_String(strDirectory.empty() ? "" : m_toUTF8.Convert(strDirectory.c_str()));
+ 
+diff --git a/vnsicommand.h b/vnsicommand.h
+index 96e891b..ffd1a43 100644
+--- a/vnsicommand.h
++++ b/vnsicommand.h
+@@ -55,6 +55,7 @@
+ #define CONFNAME_AVOIDEPGSCAN "AvoidEPGScan"
+ #define CONFNAME_DISABLESCRAMBLETIMEOUT "DisableScrambleTimeout"
+ #define CONFNAME_DISABLECAMBLACKLIST "DisableCamBlacklist"
++#define CONFNAME_GROUPRECORDINGS "GroupRecorsings"
+ 
+ /* OPCODE 1 - 19: VNSI network functions for general purpose */
+ #define VNSI_LOGIN                 1
+-- 
+2.11.0
+
diff --git a/debian/patches/0003-fix-typo.patch b/debian/patches/0003-fix-typo.patch
new file mode 100644
index 0000000..9b7e618
--- /dev/null
+++ b/debian/patches/0003-fix-typo.patch
@@ -0,0 +1,25 @@
+From 4bc0effa5e06a635ef756786ae44909460224b6f Mon Sep 17 00:00:00 2001
+From: Rainer Hochecker <fernetmenta at online.de>
+Date: Sat, 25 Feb 2017 18:14:09 +0100
+Subject: [PATCH 3/6] fix typo
+
+---
+ vnsicommand.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vnsicommand.h b/vnsicommand.h
+index ffd1a43..130a79c 100644
+--- a/vnsicommand.h
++++ b/vnsicommand.h
+@@ -55,7 +55,7 @@
+ #define CONFNAME_AVOIDEPGSCAN "AvoidEPGScan"
+ #define CONFNAME_DISABLESCRAMBLETIMEOUT "DisableScrambleTimeout"
+ #define CONFNAME_DISABLECAMBLACKLIST "DisableCamBlacklist"
+-#define CONFNAME_GROUPRECORDINGS "GroupRecorsings"
++#define CONFNAME_GROUPRECORDINGS "GroupRecordings"
+ 
+ /* OPCODE 1 - 19: VNSI network functions for general purpose */
+ #define VNSI_LOGIN                 1
+-- 
+2.11.0
+
diff --git a/debian/patches/0004-fix-segfault-if-recording-has-no-title.patch b/debian/patches/0004-fix-segfault-if-recording-has-no-title.patch
new file mode 100644
index 0000000..ae7eae0
--- /dev/null
+++ b/debian/patches/0004-fix-segfault-if-recording-has-no-title.patch
@@ -0,0 +1,26 @@
+From 615a077be1ef669feae3b6b85291b12278577793 Mon Sep 17 00:00:00 2001
+From: Rainer Hochecker <fernetmenta at online.de>
+Date: Sat, 4 Mar 2017 18:07:43 +0100
+Subject: [PATCH 4/6] fix segfault if recording has no title
+
+---
+ vnsitimer.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/vnsitimer.c b/vnsitimer.c
+index 4dbd8e7..8075821 100644
+--- a/vnsitimer.c
++++ b/vnsitimer.c
+@@ -461,7 +461,8 @@ void CVNSITimers::Action()
+               {
+                 if (recording->Info() != nullptr)
+                 {
+-                  if (strcmp(recording->Info()->Title(), event->Title()) == 0)
++                  if (recording->Info()->Title() != nullptr &&
++                      strcmp(recording->Info()->Title(), event->Title()) == 0)
+                   {
+                     if (recording->Info()->ShortText() != nullptr && event->ShortText() != nullptr &&
+                         strcmp(recording->Info()->ShortText(), event->ShortText()) == 0)
+-- 
+2.11.0
+
diff --git a/debian/patches/0005-Added-Messgae-Low-disk-space-to-list-of-ignored-mess.patch b/debian/patches/0005-Added-Messgae-Low-disk-space-to-list-of-ignored-mess.patch
new file mode 100644
index 0000000..89b1158
--- /dev/null
+++ b/debian/patches/0005-Added-Messgae-Low-disk-space-to-list-of-ignored-mess.patch
@@ -0,0 +1,25 @@
+From 59a75f41c0412a17bbba5f4aae217055e6b0c4c1 Mon Sep 17 00:00:00 2001
+From: root <root at majestix.gallien.gal>
+Date: Mon, 8 May 2017 11:10:40 +0200
+Subject: [PATCH 5/6] - Added Messgae "Low disk space!" to list of ignored
+ messages
+
+---
+ vnsiclient.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/vnsiclient.c b/vnsiclient.c
+index c2a95a1..1fb76a8 100644
+--- a/vnsiclient.c
++++ b/vnsiclient.c
+@@ -350,6 +350,7 @@ void cVNSIClient::OsdStatusMessage(const char *Message)
+     else if (strcasecmp(Message, trVDR("Cancel editing?")) == 0) return;
+     else if (strcasecmp(Message, trVDR("Cutter already running - Add to cutting queue?")) == 0) return;
+     else if (strcasecmp(Message, trVDR("No index-file found. Creating may take minutes. Create one?")) == 0) return;
++    else if (strcasecmp(Message, trVDR("Low disk space!")) == 0) return;
+     else if (strncmp(Message, trVDR("VDR will shut down in"), 21) == 0) return;
+ 
+     cResponsePacket resp;
+-- 
+2.11.0
+
diff --git a/debian/patches/0006-fix-invalid-locking-sequence.patch b/debian/patches/0006-fix-invalid-locking-sequence.patch
new file mode 100644
index 0000000..895b3bc
--- /dev/null
+++ b/debian/patches/0006-fix-invalid-locking-sequence.patch
@@ -0,0 +1,122 @@
+From 2c42df3cf1ba37184e9106091f383ea6009490da Mon Sep 17 00:00:00 2001
+From: Rainer Hochecker <fernetmenta at online.de>
+Date: Thu, 15 Jun 2017 08:19:21 +0200
+Subject: [PATCH 6/6] fix invalid locking sequence
+
+---
+ vnsiclient.c | 32 ++------------------------------
+ 1 file changed, 2 insertions(+), 30 deletions(-)
+
+diff --git a/vnsiclient.c b/vnsiclient.c
+index 1fb76a8..7ed1fab 100644
+--- a/vnsiclient.c
++++ b/vnsiclient.c
+@@ -226,6 +226,7 @@ int cVNSIClient::EpgChange()
+     return callAgain;
+ 
+ #if VDRVERSNUM >= 20301
++  LOCK_CHANNELS_READ;
+   cStateKey SchedulesStateKey(true);
+   const cSchedules *schedules = cSchedules::GetSchedulesRead(SchedulesStateKey);
+   if (!schedules)
+@@ -246,7 +247,6 @@ int cVNSIClient::EpgChange()
+       continue;
+ 
+ #if VDRVERSNUM >= 20301
+-    LOCK_CHANNELS_READ;
+     const cChannel *channel = Channels->GetByChannelID(schedule->ChannelID());
+ #else
+     Channels.Lock(false);
+@@ -2040,6 +2040,7 @@ bool cVNSIClient::processRECORDINGS_GetList(cRequestPacket &req) /* OPCODE 102 *
+ {
+   cMutexLock lock(&m_timerLock);
+ #if VDRVERSNUM >= 20301
++  LOCK_CHANNELS_READ;
+   LOCK_RECORDINGS_READ;
+ #else
+   cThreadLock RecordingsLock(&Recordings);
+@@ -2054,11 +2055,7 @@ bool cVNSIClient::processRECORDINGS_GetList(cRequestPacket &req) /* OPCODE 102 *
+   for (cRecording *recording = Recordings.First(); recording; recording = Recordings.Next(recording))
+ #endif
+   {
+-#if APIVERSNUM >= 10705
+     const cEvent *event = recording->Info()->GetEvent();
+-#else
+-    const cEvent *event = NULL;
+-#endif
+ 
+     time_t recordingStart    = 0;
+     int    recordingDuration = 0;
+@@ -2077,11 +2074,7 @@ bool cVNSIClient::processRECORDINGS_GetList(cRequestPacket &req) /* OPCODE 102 *
+       }
+       else
+       {
+-#if APIVERSNUM >= 10727
+         recordingStart = recording->Start();
+-#else
+-        recordingStart = recording->start;
+-#endif
+       }
+     }
+     DEBUGLOG("GRI: RC: recordingStart=%lu recordingDuration=%i", recordingStart, recordingDuration);
+@@ -2093,18 +2086,10 @@ bool cVNSIClient::processRECORDINGS_GetList(cRequestPacket &req) /* OPCODE 102 *
+     resp.add_U32(recordingDuration);
+ 
+     // priority
+-#if APIVERSNUM >= 10727
+     resp.add_U32(recording->Priority());
+-#else
+-    resp.add_U32(recording->priority);
+-#endif
+ 
+     // lifetime
+-#if APIVERSNUM >= 10727
+     resp.add_U32(recording->Lifetime());
+-#else
+-    resp.add_U32(recording->lifetime);
+-#endif
+ 
+     // channel_name
+     resp.add_String(recording->Info()->ChannelName() ? m_toUTF8.Convert(recording->Info()->ChannelName()) : "");
+@@ -2112,7 +2097,6 @@ bool cVNSIClient::processRECORDINGS_GetList(cRequestPacket &req) /* OPCODE 102 *
+     {
+       // channel uuid
+ #if VDRVERSNUM >= 20301
+-      LOCK_CHANNELS_READ;
+       const cChannel *channel = Channels->GetByChannelID(recording->Info()->ChannelID());
+ #else
+       Channels.Lock(false);
+@@ -2840,11 +2824,7 @@ bool cVNSIClient::processRECORDINGS_DELETED_GetList(cRequestPacket &req) /* OPCO
+       }
+       else
+       {
+-#if APIVERSNUM >= 10727
+         recordingStart = recording->Start();
+-#else
+-        recordingStart = recording->start;
+-#endif
+       }
+     }
+     DEBUGLOG("GRI: RC: recordingStart=%lu recordingDuration=%i", recordingStart, recordingDuration);
+@@ -2856,18 +2836,10 @@ bool cVNSIClient::processRECORDINGS_DELETED_GetList(cRequestPacket &req) /* OPCO
+     resp.add_U32(recordingDuration);
+ 
+     // priority
+-#if APIVERSNUM >= 10727
+     resp.add_U32(recording->Priority());
+-#else
+-    resp.add_U32(recording->priority);
+-#endif
+ 
+     // lifetime
+-#if APIVERSNUM >= 10727
+     resp.add_U32(recording->Lifetime());
+-#else
+-    resp.add_U32(recording->lifetime);
+-#endif
+ 
+     // channel_name
+     resp.add_String(recording->Info()->ChannelName() ? m_toUTF8.Convert(recording->Info()->ChannelName()) : "");
+-- 
+2.11.0
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..cdf2ac6
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,6 @@
+0001-Fix-building-against-musl-C-library.patch
+0002-make-grouping-of-series-recordings-configurable.patch
+0003-fix-typo.patch
+0004-fix-segfault-if-recording-has-no-title.patch
+0005-Added-Messgae-Low-disk-space-to-list-of-ignored-mess.patch
+0006-fix-invalid-locking-sequence.patch

-- 
vdr-plugin-vnsiserver packaging



More information about the pkg-multimedia-commits mailing list