summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
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;