summaryrefslogtreecommitdiff
path: root/svdrp.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2010-01-17 12:27:01 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2010-01-17 12:27:01 +0100
commitc198a259432a5ee612ac8dd211f8017f0786fedb (patch)
tree41ae5933cfac61d345c449a56d33a7dbde04169b /svdrp.c
parent97e4dbe7737852144e97e4edff36be95f39c5cc5 (diff)
downloadvdr-c198a259432a5ee612ac8dd211f8017f0786fedb.tar.gz
vdr-c198a259432a5ee612ac8dd211f8017f0786fedb.tar.bz2
If svdrphosts.conf contains only the address of the local host, the SVDRP port is opened only for the local host
Diffstat (limited to 'svdrp.c')
-rw-r--r--svdrp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/svdrp.c b/svdrp.c
index b181fcd5..cb9a9351 100644
--- a/svdrp.c
+++ b/svdrp.c
@@ -10,7 +10,7 @@
* and interact with the Video Disk Recorder - or write a full featured
* graphical interface that sits on top of an SVDRP connection.
*
- * $Id: svdrp.c 2.7 2010/01/03 15:41:26 kls Exp $
+ * $Id: svdrp.c 2.8 2010/01/17 12:23:31 kls Exp $
*/
#include "svdrp.h"
@@ -79,7 +79,7 @@ bool cSocket::Open(void)
struct sockaddr_in name;
name.sin_family = AF_INET;
name.sin_port = htons(port);
- name.sin_addr.s_addr = htonl(INADDR_ANY);
+ 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();