summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-05-21 10:28:10 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2017-05-21 10:28:10 +0200
commit0f1f2778198c161db2c1b20bdd29ff4a6e9326e1 (patch)
tree624903cb63f4e88a70223dc3eb4f9c295022aff9 /config.c
parent3b1b5bde681febf6a3900438fbc2d386511c4393 (diff)
downloadvdr-0f1f2778198c161db2c1b20bdd29ff4a6e9326e1.tar.gz
vdr-0f1f2778198c161db2c1b20bdd29ff4a6e9326e1.tar.bz2
Fixed setting the local machine's SVDRP host name; only saving the SVDRP host name if it differs from the system's host name
Diffstat (limited to 'config.c')
-rw-r--r--config.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/config.c b/config.c
index 79eec8a3..0b5a1021 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c 4.5 2017/02/14 11:02:48 kls Exp $
+ * $Id: config.c 4.6 2017/05/21 10:25:26 kls Exp $
*/
#include "config.h"
@@ -640,7 +640,7 @@ bool cSetup::Parse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "EPGLinger")) EPGLinger = atoi(Value);
else if (!strcasecmp(Name, "SVDRPTimeout")) SVDRPTimeout = atoi(Value);
else if (!strcasecmp(Name, "SVDRPPeering")) SVDRPPeering = atoi(Value);
- else if (!strcasecmp(Name, "SVDRPHostName")) { if (!*SVDRPHostName) strn0cpy(SVDRPHostName, Value, sizeof(SVDRPHostName)); }
+ else if (!strcasecmp(Name, "SVDRPHostName")) { if (*Value) strn0cpy(SVDRPHostName, Value, sizeof(SVDRPHostName)); }
else if (!strcasecmp(Name, "SVDRPdefaultHost")) strn0cpy(SVDRPDefaultHost, Value, sizeof(SVDRPDefaultHost));
else if (!strcasecmp(Name, "ZapTimeout")) ZapTimeout = atoi(Value);
else if (!strcasecmp(Name, "ChannelEntryTimeout")) ChannelEntryTimeout= atoi(Value);
@@ -771,7 +771,7 @@ bool cSetup::Save(void)
Store("EPGLinger", EPGLinger);
Store("SVDRPTimeout", SVDRPTimeout);
Store("SVDRPPeering", SVDRPPeering);
- Store("SVDRPHostName", SVDRPHostName);
+ Store("SVDRPHostName", strcmp(SVDRPHostName, GetHostName()) ? SVDRPHostName : "");
Store("SVDRPDefaultHost", SVDRPDefaultHost);
Store("ZapTimeout", ZapTimeout);
Store("ChannelEntryTimeout",ChannelEntryTimeout);