summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-10-27 15:26:20 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-10-27 15:26:20 +0100
commit3a3ff949670c61a4a8856e1391222e156eb1cd17 (patch)
treefd8023fefa4829ceea428ec424608ef9aace1d9a /src/configreader.cpp
parentcba05046ce20eed4c429093296eb481bf95d7e07 (diff)
parentc99a43968f6a04c7d5d3038b4e39d14c22aa6e89 (diff)
Merge insp20
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index af8a15f43..54c32d846 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -41,6 +41,14 @@ ServerConfig::ServerConfig()
OperMaxChans = 30;
c_ipv4_range = 32;
c_ipv6_range = 128;
+
+ std::vector<KeyVal>* items;
+ EmptyTag = ConfigTag::create("empty", "<auto>", 0, items);
+}
+
+ServerConfig::~ServerConfig()
+{
+ delete EmptyTag;
}
static void ValidHost(const std::string& p, const std::string& msg)
@@ -707,7 +715,7 @@ ConfigTag* ServerConfig::ConfValue(const std::string &tag)
{
ConfigTagList found = config_data.equal_range(tag);
if (found.first == found.second)
- return NULL;
+ return EmptyTag;
ConfigTag* rv = found.first->second;
found.first++;
if (found.first != found.second)