summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-04-14 16:53:03 +0100
committerPeter Powell <petpow@saberuk.com>2018-04-16 15:07:06 +0100
commit7ef2f87e39bd22c7914caf7f2afbb1a3bf8fbd43 (patch)
tree29c9efd1c7f1f2e3c9e8d058068c28d5b66c40e0 /src/modules/extra
parentdec17a2e32573a32751c975b5b55217442cd3185 (diff)
Remove the default value in ConfigTag::get{Duration,Float,Int}.
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_mysql.cpp2
-rw-r--r--src/modules/extra/m_ssl_mbedtls.cpp4
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index a177951ce..6c65cd87e 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -272,7 +272,7 @@ class SQLConnection : public SQL::Provider
std::string user = config->getString("user");
std::string pass = config->getString("pass");
std::string dbname = config->getString("name");
- int port = config->getInt("port");
+ int port = config->getInt("port", 3306);
bool rv = mysql_real_connect(connection, host.c_str(), user.c_str(), pass.c_str(), dbname.c_str(), port, NULL, 0);
if (!rv)
return rv;
diff --git a/src/modules/extra/m_ssl_mbedtls.cpp b/src/modules/extra/m_ssl_mbedtls.cpp
index 8c15342f2..391d4d79b 100644
--- a/src/modules/extra/m_ssl_mbedtls.cpp
+++ b/src/modules/extra/m_ssl_mbedtls.cpp
@@ -413,8 +413,8 @@ namespace mbedTLS
, mindh(tag->getInt("mindhbits", 2048))
, hashstr(tag->getString("hash", "sha256"))
, castr(tag->getString("cafile"))
- , minver(tag->getInt("minver"))
- , maxver(tag->getInt("maxver"))
+ , minver(tag->getInt("minver", 0))
+ , maxver(tag->getInt("maxver", 0))
, outrecsize(tag->getInt("outrecsize", 2048, 512, 16384))
, requestclientcert(tag->getBool("requestclientcert", true))
{
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 2129e5da7..828fcc26a 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -334,8 +334,8 @@ namespace OpenSSL
*/
void SetContextOptions(const std::string& ctxname, ConfigTag* tag, Context& context)
{
- long setoptions = tag->getInt(ctxname + "setoptions");
- long clearoptions = tag->getInt(ctxname + "clearoptions");
+ long setoptions = tag->getInt(ctxname + "setoptions", 0);
+ long clearoptions = tag->getInt(ctxname + "clearoptions", 0);
#ifdef SSL_OP_NO_COMPRESSION
if (!tag->getBool("compression", false)) // Disable compression by default
setoptions |= SSL_OP_NO_COMPRESSION;