FernetMenta / vdr-plugin-vnsiserver

VDR plugin to handle XBMC clients.
GNU General Public License v2.0
16 stars 33 forks source link

Commit 3d6e4be7ae055790eba806f88bd6debc6d7a2903 breaks vdr-2.2.0 compatibilty #44

Closed helau closed 8 years ago

helau commented 8 years ago

Hello With the change 3d6e4be7ae055790eba806f88bd6debc6d7a2903 vdr-2.2.0 does no longer compile. This patch will correct it:

--- vnsiclient.c.org    2016-03-08 08:53:43.862787053 +0100
+++ vnsiclient.c        2016-03-08 09:02:12.106804520 +0100
@@ -1969,9 +1969,14 @@
     if (m_protocolVersion >= 9)
     {
       // channel uuid
-      const cChannel *channel = NULL;
+#if VDRVERSNUM >= 20301
       LOCK_CHANNELS_READ;
-      channel = Channels->GetByChannelID(recording->Info()->ChannelID());
+      const cChannel *channel = Channels->GetByChannelID(recording->Info()->ChannelID());
+#else
+      Channels.Lock(false);
+      const cChannel *channel = Channels.GetByChannelID(recording->Info()->ChannelID());
+      Channels.Unlock();
+#endif
       if (channel)
         resp.add_S32(CreateChannelUID(channel));
      else
FernetMenta commented 8 years ago

thanks, applied