]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Merge insp20
authorAttila Molnar <attilamolnar@hush.com>
Fri, 2 Sep 2016 18:58:58 +0000 (20:58 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Fri, 2 Sep 2016 18:58:58 +0000 (20:58 +0200)
src/modules/extra/m_sqlite3.cpp
src/modules/m_jumpserver.cpp

index 05203da39c6ae7fb464a33ffe33f7ed3781cb047..8c07bfc6aa60e601bb001b6cdff6dec4731a90b2 100644 (file)
@@ -91,8 +91,10 @@ class SQLConn : public SQLProvider
                std::string host = tag->getString("hostname");
                if (sqlite3_open_v2(host.c_str(), &conn, SQLITE_OPEN_READWRITE, 0) != SQLITE_OK)
                {
-                       ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "WARNING: Could not open DB with id: " + tag->getString("id"));
+                       // Even in case of an error conn must be closed
+                       sqlite3_close(conn);
                        conn = NULL;
+                       ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "WARNING: Could not open DB with id: " + tag->getString("id"));
                }
        }
 
index f59ef045d1a0b4c5eeb9cf912ac4251b96e0b52c..89391c8a4bf6268e3ae8c6e438787049e1491bf0 100644 (file)
@@ -162,7 +162,7 @@ class ModuleJumpServer : public Module
                        int port = js.GetPort(user);
                        user->WriteNumeric(RPL_REDIR, js.redirect_to, port, "Please use this Server/Port instead");
                        ServerInstance->Users->QuitUser(user, js.reason);
-                       return MOD_RES_PASSTHRU;
+                       return MOD_RES_DENY;
                }
                return MOD_RES_PASSTHRU;
        }