[vdr-plugin-remote] 01/01: Imported Upstream version 0.7.0

Tobias Grimm tiber-guest at moszumanska.debian.org
Sat Sep 26 21:27:07 UTC 2015


This is an automated email from the git hooks/post-receive script.

tiber-guest pushed a commit to annotated tag upstream/0.7.0
in repository vdr-plugin-remote.

commit 901f753bdcfe3a19c4c7dc307d88d2cefaf79ec9
Author: etobi <git at e-tobi.net>
Date:   Thu Sep 24 19:25:34 2015 +0200

    Imported Upstream version 0.7.0
---
 CONTRIBUTORS            |   1 +
 HISTORY                 |   5 ++
 Makefile                |  11 ++++-
 README                  |   6 +--
 compat.c                | 119 ++++++++++++++++++++++++++++++++++++++++++++++++
 remotetcp.h => compat.h |  46 ++++++++++---------
 po/de_DE.po             |  13 +-----
 po/fi_FI.po             |  13 +-----
 po/fr_FR.po             |  13 +-----
 po/it_IT.po             |   2 +-
 po/pl_PL.po             |  13 +-----
 po/ru_RU.po             |  13 +-----
 remote.c                |   3 +-
 remotetcp.c             |  13 +++++-
 remotetcp.h             |   6 +--
 15 files changed, 183 insertions(+), 94 deletions(-)

diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 7635b89..ef9752e 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -9,6 +9,7 @@ Mike Gratsas <MikeGratsas at techemail dot com>
 
 Ville Skytt� <ville dot skytta at iki dot fi>
  for translating OSD texts to the Finnish language
+ for providing a patch to use plgcfg from pkg-config
 
 Ronny Kornexl <ronny dot kornexl at online dot de>
  for reporting that cTtyStatus::Recording() and cTtyStatus::Replaying()
diff --git a/HISTORY b/HISTORY
index f904822..ee31b61 100644
--- a/HISTORY
+++ b/HISTORY
@@ -141,3 +141,8 @@ VDR Plugin 'remote' Revision History
   o Avoid display errors with VDR 2.2.0.
   o Fixed misaligned output caused by multi-byte characters.
   o Some speed improvements.
+
+2015-09-20: Version 0.7.0
+- Fix a random crash when terminating the tcp remote.
+- Use plgcfg from pkg-config (thanks to Ville Skytt�).
+- Support VDR version 2.3.1+.
diff --git a/Makefile b/Makefile
index 2ace1a2..f535aed 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 #
 # Remote Control plugin for the Video Disk Recorder
 #
-# Copyright (C) 2002-2010 Oliver Endriss <o.endriss at gmx.de>
+# Copyright (C) 2002-2015 Oliver Endriss <o.endriss at gmx.de>
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -34,6 +34,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
 PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
 LIBDIR = $(DESTDIR)$(call PKGCFG,libdir)
 LOCDIR = $(DESTDIR)$(call PKGCFG,locdir)
+PLGCFG = $(call PKGCFG,plgcfg)
 #
 TMPDIR ?= /tmp
 
@@ -90,6 +91,11 @@ OLD_I18N = 1
 i18n install-i18n:
 	
 endif
+
+else # compatibility section
+
+-include $(PLGCFG)
+
 endif # compatibility section
 
 ### The name of the distribution archive:
@@ -119,6 +125,7 @@ endif
 ifneq ($(OLD_I18N),)
 OBJS += i18n.o
 endif
+OBJS += compat.o
 
 ### The main target:
 
@@ -191,6 +198,6 @@ clean:
 env:
 	@echo "Configuration:"
 	@echo "  APIVERSION $(APIVERSION)"
-	@echo "  CXX $(CXX)  CXXFLAGS $(CXXFLAGS)"
+	@echo "  CXX $(CXX)  CXXFLAGS $(CXXFLAGS)  LDFLAGS $(LDFLAGS)"
 	@echo "  VDRDIR $(VDRDIR)  LIBDIR $(LIBDIR)  LOCDIR $(LOCDIR)"
 
diff --git a/README b/README
index 2865f93..1b0045b 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
 remote - Remote Control plugin for the Video Disk Recorder (VDR)
 ================================================================
 
-Version:                      0.6.0
+Version:                      0.7.0
 
 Written by:                   Oliver Endriss <o.endriss at gmx.de>
 
@@ -38,8 +38,8 @@ Installation:
 -------------
 The Remote Control plugin is installed the same way as any other plugin:
 - cd VDR/PLUGINS/src
-- tar xfz vdr-remote-0.6.0.tgz
-- ln -s remote-0.6.0 remote
+- tar xfz vdr-remote-0.7.0.tgz
+- ln -s remote-0.7.0 remote
 - cd ../..
 - make plugins
 
diff --git a/compat.c b/compat.c
new file mode 100644
index 0000000..5a07fcf
--- /dev/null
+++ b/compat.c
@@ -0,0 +1,119 @@
+/*
+ * Remote Control plugin for the Video Disk Recorder
+ *
+ * compat.h: Compatibility stuff
+ *
+ * Copyright (C) 2015 Oliver Endriss <o.endriss at gmx.de>
+ *
+ * cSocketRemote was copied from cSocket (svdrp.c, VDR 2.2.0):
+ * Copyright (C) 2000, 2003, 2006, 2008, 2013 Klaus Schmidinger
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ */
+
+#include <vdr/config.h>
+#include "compat.h"
+
+#if VDRVERSNUM >= 20300
+// --- cSocket ---------------------------------------------------------------
+
+cSocketRemote::cSocketRemote(int Port, int Queue)
+{
+  port = Port;
+  sock = -1;
+  queue = Queue;
+}
+
+cSocketRemote::~cSocketRemote()
+{
+  Close();
+}
+
+void cSocketRemote::Close(void)
+{
+  if (sock >= 0) {
+     close(sock);
+     sock = -1;
+     }
+}
+
+bool cSocketRemote::Open(void)
+{
+  if (sock < 0) {
+     // create socket:
+     sock = socket(PF_INET, SOCK_STREAM, 0);
+     if (sock < 0) {
+        LOG_ERROR;
+        port = 0;
+        return false;
+        }
+     // allow it to always reuse the same port:
+     int ReUseAddr = 1;
+     setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &ReUseAddr, sizeof(ReUseAddr));
+     //
+     struct sockaddr_in name;
+     name.sin_family = AF_INET;
+     name.sin_port = htons(port);
+     name.sin_addr.s_addr = SVDRPhosts.LocalhostOnly() ? htonl(INADDR_LOOPBACK) : htonl(INADDR_ANY);
+     if (bind(sock, (struct sockaddr *)&name, sizeof(name)) < 0) {
+        LOG_ERROR;
+        Close();
+        return false;
+        }
+     // make it non-blocking:
+     int oldflags = fcntl(sock, F_GETFL, 0);
+     if (oldflags < 0) {
+        LOG_ERROR;
+        return false;
+        }
+     oldflags |= O_NONBLOCK;
+     if (fcntl(sock, F_SETFL, oldflags) < 0) {
+        LOG_ERROR;
+        return false;
+        }
+     // listen to the socket:
+     if (listen(sock, queue) < 0) {
+        LOG_ERROR;
+        return false;
+        }
+     }
+  return true;
+}
+
+int cSocketRemote::Accept(void)
+{
+  if (Open()) {
+     struct sockaddr_in clientname;
+     uint size = sizeof(clientname);
+     int newsock = accept(sock, (struct sockaddr *)&clientname, &size);
+     if (newsock > 0) {
+        bool accepted = SVDRPhosts.Acceptable(clientname.sin_addr.s_addr);
+        if (!accepted) {
+           const char *s = "Access denied!\n";
+           if (write(newsock, s, strlen(s)) < 0)
+              LOG_ERROR;
+           close(newsock);
+           newsock = -1;
+           }
+        isyslog("connect from %s, port %hu - %s", inet_ntoa(clientname.sin_addr), ntohs(clientname.sin_port), accepted ? "accepted" : "DENIED");
+        }
+     else if (errno != EINTR && errno != EAGAIN)
+        LOG_ERROR;
+     return newsock;
+     }
+  return -1;
+}
+#endif // VDRVERSNUM >= 20300
diff --git a/remotetcp.h b/compat.h
similarity index 59%
copy from remotetcp.h
copy to compat.h
index 109e74e..07829fb 100644
--- a/remotetcp.h
+++ b/compat.h
@@ -1,9 +1,12 @@
 /*
  * Remote Control plugin for the Video Disk Recorder
  *
- * remotetcp.h: tcp/telnet remote control
+ * compat.h: Compatibility stuff
  *
- * Copyright (C) 2002-2012 Oliver Endriss <o.endriss at gmx.de>
+ * Copyright (C) 2015 Oliver Endriss <o.endriss at gmx.de>
+ *
+ * cSocketRemote was copied from cSocket (svdrp.h, VDR 2.2.0):
+ * Copyright (C) 2000, 2003, 2006, 2008, 2013 Klaus Schmidinger
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -21,30 +24,29 @@
  * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  */
 
+#ifndef __PLUGIN_REMOTE_COMPAT_H
+#define __PLUGIN_REMOTE_COMPAT_H
 
-#ifndef __PLUGIN_REMOTETCP_H
-#define __PLUGIN_REMOTETCP_H
-
-
-#include <vdr/svdrp.h>
-#include "remote.h"
-
+#if VDRVERSNUM >= 20300
 
-/****************************************************************************/
-class cTcpRemote : protected cRemoteDevTty
-/****************************************************************************/
-{
+class cSocketRemote {
 private:
-  cTtyStatus *cstatus;
-  cSocket *csock;
+  int port;
+  int sock;
+  int queue;
+  void Close(void);
+public:
+  cSocketRemote(int Port, int Queue = 1);
+  ~cSocketRemote();
+  bool Open(void);
+  int Accept(void);
+  };
 
-protected:
-  virtual uint64_t getKey(void);
+#else // VDRVERSNUM >= 20300
 
-public:
-  cTcpRemote(const char *name, int f, char *d);
-  virtual ~cTcpRemote();
-};
+#include <vdr/svdrp.h>
+typedef cSocket	cSocketRemote;
 
+#endif // VDRVERSNUM >= 20300
 
-#endif // __PLUGIN_REMOTETCP_H
+#endif //__PLUGIN_REMOTE_COMPAT_H
diff --git a/po/de_DE.po b/po/de_DE.po
index 5a282a8..6b4f4f7 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Remote Control plugin 0.4.0\n"
 "Report-Msgid-Bugs-To: <o.endriss at gmx.de>\n"
-"POT-Creation-Date: 2012-05-27 17:56+0200\n"
+"POT-Creation-Date: 2015-09-15 18:54+0200\n"
 "PO-Revision-Date: 2007-10-05 06:58+0200\n"
 "Last-Translator: Oliver Endriss <o.endriss at gmx.de>, 2002-2007\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -16,47 +16,36 @@ msgstr ""
 "Content-Type: text/plain; charset=ISO-8859-15\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: remote.c:52
 msgid "Remote control"
 msgstr "Fernbedienung"
 
-#: remote.c:233 remote.c:777
 #, c-format
 msgid "%s: %s"
 msgstr "%s: %s"
 
-#: remote.c:255
 msgid "Error uploading keymap"
 msgstr "Fehler beim Laden der Tastenbelegung"
 
-#: remote.c:336
 msgid "Press any key to use pre-loaded keymap"
 msgstr "Taste dr�cken, um zuvor geladene Keymap zu verwenden"
 
-#: remote.c:341
 msgid "User-supplied keymap will be used"
 msgstr "Benutzerdefinierte Keymap wird verwendet"
 
-#: remote.c:347
 msgid "Remote control test - press and hold down any key"
 msgstr "Test der Fernbedienung - beliebige Taste gedr�ckt halten"
 
-#: remote.c:366
 msgid "RC5 protocol detected"
 msgstr "RC5-Protokoll erkannt"
 
-#: remote.c:390
 msgid "RC5 protocol detected (inverted signal)"
 msgstr "RC5-Protokoll erkannt (invertiertes Signal)"
 
-#: remote.c:401
 msgid "RCMM protocol detected"
 msgstr "RCMM-Protokoll erkannt"
 
-#: remote.c:412
 msgid "RCMM protocol detected (inverted signal)"
 msgstr "RCMM-Protokoll erkannt (invertiertes Signal)"
 
-#: remote.c:420
 msgid "No remote control detected"
 msgstr "Keine Fernbedienung erkannt"
diff --git a/po/fi_FI.po b/po/fi_FI.po
index 33ae623..0adf1c2 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Remote Control plugin 0.4.0\n"
 "Report-Msgid-Bugs-To: <o.endriss at gmx.de>\n"
-"POT-Creation-Date: 2012-05-27 17:56+0200\n"
+"POT-Creation-Date: 2015-09-15 18:54+0200\n"
 "PO-Revision-Date: 2007-10-05 06:58+0200\n"
 "Last-Translator: Ville Skytt� <ville dot skytta at iki dot fi>, 2004\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -16,47 +16,36 @@ msgstr ""
 "Content-Type: text/plain; charset=ISO-8859-15\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: remote.c:52
 msgid "Remote control"
 msgstr "Kaukos��din"
 
-#: remote.c:233 remote.c:777
 #, c-format
 msgid "%s: %s"
 msgstr "%s: %s"
 
-#: remote.c:255
 msgid "Error uploading keymap"
 msgstr "N�pp�inkartan lataaminen ep�onnistui"
 
-#: remote.c:336
 msgid "Press any key to use pre-loaded keymap"
 msgstr "Paina mit� tahansa n�pp�int� k�ytt��ksesi oletusn�pp�inkarttaa"
 
-#: remote.c:341
 msgid "User-supplied keymap will be used"
 msgstr "K�ytet��n k�ytt�j�n m��rittelem�� n�pp�inkarttaa"
 
-#: remote.c:347
 msgid "Remote control test - press and hold down any key"
 msgstr "Kaukos��dintesti - paina ja pid� alhaalla jotain kaukos��timen n�pp�int�"
 
-#: remote.c:366
 msgid "RC5 protocol detected"
 msgstr "RC5-yhteysk�yt�nt� tunnistettu"
 
-#: remote.c:390
 msgid "RC5 protocol detected (inverted signal)"
 msgstr "RC5-yhteysk�yt�nt� tunnistettu (k��nteinen signaali)"
 
-#: remote.c:401
 msgid "RCMM protocol detected"
 msgstr "RCMM-yhteysk�yt�nt� tunnistettu"
 
-#: remote.c:412
 msgid "RCMM protocol detected (inverted signal)"
 msgstr "RCMM-yhteysk�yt�nt� tunnistettu (k��nteinen signaali)"
 
-#: remote.c:420
 msgid "No remote control detected"
 msgstr "Kaukos��dint� ei tunnistettu"
diff --git a/po/fr_FR.po b/po/fr_FR.po
index df382d2..59dad1f 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Remote Control plugin 0.4.0\n"
 "Report-Msgid-Bugs-To: <o.endriss at gmx.de>\n"
-"POT-Creation-Date: 2012-05-27 17:56+0200\n"
+"POT-Creation-Date: 2015-09-15 18:54+0200\n"
 "PO-Revision-Date: 2007-10-05 06:58+0200\n"
 "Last-Translator: Pierre Briec <eclipse dot vdr at gmail dot com>, 2006\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -16,47 +16,36 @@ msgstr ""
 "Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: remote.c:52
 msgid "Remote control"
 msgstr "T�l�commande"
 
-#: remote.c:233 remote.c:777
 #, c-format
 msgid "%s: %s"
 msgstr "%s: %s"
 
-#: remote.c:255
 msgid "Error uploading keymap"
 msgstr "Erreur chargement tables de touches"
 
-#: remote.c:336
 msgid "Press any key to use pre-loaded keymap"
 msgstr "Appuyez sur une touche pour utiliser un Keymap pr�charg�"
 
-#: remote.c:341
 msgid "User-supplied keymap will be used"
 msgstr "Keymap personnalis� va �tre utilis�"
 
-#: remote.c:347
 msgid "Remote control test - press and hold down any key"
 msgstr "Test t�l�commande - Appuyer et maintenir une touche enfonc�e"
 
-#: remote.c:366
 msgid "RC5 protocol detected"
 msgstr "Protocole RC5 d�tect�"
 
-#: remote.c:390
 msgid "RC5 protocol detected (inverted signal)"
 msgstr "Protocole RC5 d�tect� (signal invers�)"
 
-#: remote.c:401
 msgid "RCMM protocol detected"
 msgstr "Protocole RCMM d�tect�"
 
-#: remote.c:412
 msgid "RCMM protocol detected (inverted signal)"
 msgstr "Protocole RCMM d�tect� (signal invers�)"
 
-#: remote.c:420
 msgid "No remote control detected"
 msgstr "Aucune t�l�commande d�tect�e"
diff --git a/po/it_IT.po b/po/it_IT.po
index ca1ce87..bf0df8b 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Remote Control plugin 0.4.0\n"
 "Report-Msgid-Bugs-To: <o.endriss at gmx.de>\n"
-"POT-Creation-Date: 2012-12-26 02:52+0100\n"
+"POT-Creation-Date: 2015-09-15 18:54+0200\n"
 "PO-Revision-Date: 2007-12-29 02:22+0100\n"
 "Last-Translator: Gringo <vdr-italian at tiscali.it>\n"
 "Language-Team:  <vdr at linuxtv.org>\n"
diff --git a/po/pl_PL.po b/po/pl_PL.po
index d20a1a4..b5118a8 100644
--- a/po/pl_PL.po
+++ b/po/pl_PL.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Remote Control plugin 0.4.0\n"
 "Report-Msgid-Bugs-To: <o.endriss at gmx.de>\n"
-"POT-Creation-Date: 2012-05-27 17:56+0200\n"
+"POT-Creation-Date: 2015-09-15 18:54+0200\n"
 "PO-Revision-Date: 2007-10-05 06:58+0200\n"
 "Last-Translator: Jakub Wolnicki, 2006\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -16,47 +16,36 @@ msgstr ""
 "Content-Type: text/plain; charset=ISO-8859-2\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: remote.c:52
 msgid "Remote control"
 msgstr "Zdalne sterowanie"
 
-#: remote.c:233 remote.c:777
 #, c-format
 msgid "%s: %s"
 msgstr "%s: %s"
 
-#: remote.c:255
 msgid "Error uploading keymap"
 msgstr "Blad przy przesylaniu mapy klawiszy"
 
-#: remote.c:336
 msgid "Press any key to use pre-loaded keymap"
 msgstr "Nacisnij dowolny klawisz, aby uzyc zaladowanej mapy klawiszy"
 
-#: remote.c:341
 msgid "User-supplied keymap will be used"
 msgstr "Uzyta zostanie mapa klawiszy, zdefinowana przez uzytkownika"
 
-#: remote.c:347
 msgid "Remote control test - press and hold down any key"
 msgstr "Test zdalnego sterowania - nacisnij i przytrzymaj dowolny klawisz"
 
-#: remote.c:366
 msgid "RC5 protocol detected"
 msgstr "Wykryto protokol RC5"
 
-#: remote.c:390
 msgid "RC5 protocol detected (inverted signal)"
 msgstr "Wykryto protokol RC5 (sygnal odwrocony)"
 
-#: remote.c:401
 msgid "RCMM protocol detected"
 msgstr "Wykryto protokol RCMM"
 
-#: remote.c:412
 msgid "RCMM protocol detected (inverted signal)"
 msgstr "Wykryto protokol RCMM (sygnal odwrocony)"
 
-#: remote.c:420
 msgid "No remote control detected"
 msgstr "Nie znaleziono zdalnego sterowania"
diff --git a/po/ru_RU.po b/po/ru_RU.po
index 61d467a..43953fe 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Remote Control plugin 0.4.0\n"
 "Report-Msgid-Bugs-To: <o.endriss at gmx.de>\n"
-"POT-Creation-Date: 2012-05-27 17:56+0200\n"
+"POT-Creation-Date: 2015-09-15 18:54+0200\n"
 "PO-Revision-Date: 2007-10-05 06:58+0200\n"
 "Last-Translator: Waldemar Nikel, 2006\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -16,47 +16,36 @@ msgstr ""
 "Content-Type: text/plain; charset=ISO-8859-5\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: remote.c:52
 msgid "Remote control"
 msgstr "����� ����������"
 
-#: remote.c:233 remote.c:777
 #, c-format
 msgid "%s: %s"
 msgstr "%s: %s"
 
-#: remote.c:255
 msgid "Error uploading keymap"
 msgstr "������ ��� �������� ���������"
 
-#: remote.c:336
 msgid "Press any key to use pre-loaded keymap"
 msgstr "������� ����� ������ ��� ������������� ����� ���������� ���������"
 
-#: remote.c:341
 msgid "User-supplied keymap will be used"
 msgstr "����� �������������� ��������� ������������"
 
-#: remote.c:347
 msgid "Remote control test - press and hold down any key"
 msgstr "�������� ������ - ������� � �������� ����� ������"
 
-#: remote.c:366
 msgid "RC5 protocol detected"
 msgstr "������� �������� RC5"
 
-#: remote.c:390
 msgid "RC5 protocol detected (inverted signal)"
 msgstr "������� �������� RC5 (� ��������������� �������)"
 
-#: remote.c:401
 msgid "RCMM protocol detected"
 msgstr "������� �������� RCMM"
 
-#: remote.c:412
 msgid "RCMM protocol detected (inverted signal)"
 msgstr "������� �������� RCMM (� ��������������� �������)"
 
-#: remote.c:420
 msgid "No remote control detected"
 msgstr "����� ���������� �� �������"
diff --git a/remote.c b/remote.c
index a8c654a..7fe25a2 100644
--- a/remote.c
+++ b/remote.c
@@ -48,7 +48,7 @@
 #define AV7110_PARM_INVERSION     "/sys/module/dvb_ttpci/parameters/ir_inversion"
 #endif
 
-static const char *VERSION        = "0.6.0";
+static const char *VERSION        = "0.7.0";
 static const char *DESCRIPTION    = trNOOP("Remote control");
 
 
@@ -513,6 +513,7 @@ cRemoteDevTty::cRemoteDevTty(const char *name, int f, char *d)
 // ---------------------------------------------------------------------------
 {
     struct termios t;
+    memset(&tm, 0, sizeof tm);
 
     if (!tcgetattr(f, &tm))
     {
diff --git a/remotetcp.c b/remotetcp.c
index f9d7d86..9b8a895 100644
--- a/remotetcp.c
+++ b/remotetcp.c
@@ -3,7 +3,7 @@
  *
  * remotetcp.c: tcp/telnet remote control
  *
- * Copyright (C) 2002-2012 Oliver Endriss <o.endriss at gmx.de>
+ * Copyright (C) 2002-2015 Oliver Endriss <o.endriss at gmx.de>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -46,10 +46,16 @@ cTcpRemote::~cTcpRemote()
     }
 
     if (fh != -1)
+    {
         close(fh);
+        fh = -1;
+    }
 
     if (csock)
+    {
         delete csock;
+        csock = NULL;
+    }
 }		  
 
 
@@ -59,7 +65,7 @@ uint64_t cTcpRemote::getKey(void)
     {
         int port;
         sscanf (device, "tcp:%d", &port);
-        csock = new cSocket(port);
+        csock = new cSocketRemote(port);
         if (! csock)
         {
             esyslog("error creating socket");
@@ -77,6 +83,9 @@ uint64_t cTcpRemote::getKey(void)
     while (fh < 0)
     {
         usleep(100000);
+        if (csock == NULL)
+        	return INVALID_KEY;
+
         fh = csock->Accept();
         if (fh >= 0)
         {
diff --git a/remotetcp.h b/remotetcp.h
index 109e74e..d224d40 100644
--- a/remotetcp.h
+++ b/remotetcp.h
@@ -3,7 +3,7 @@
  *
  * remotetcp.h: tcp/telnet remote control
  *
- * Copyright (C) 2002-2012 Oliver Endriss <o.endriss at gmx.de>
+ * Copyright (C) 2002-2015 Oliver Endriss <o.endriss at gmx.de>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -26,7 +26,7 @@
 #define __PLUGIN_REMOTETCP_H
 
 
-#include <vdr/svdrp.h>
+#include "compat.h"
 #include "remote.h"
 
 
@@ -36,7 +36,7 @@ class cTcpRemote : protected cRemoteDevTty
 {
 private:
   cTtyStatus *cstatus;
-  cSocket *csock;
+  cSocketRemote *csock;
 
 protected:
   virtual uint64_t getKey(void);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vdr-dvb/vdr-plugin-remote.git



More information about the pkg-vdr-dvb-changes mailing list