From: Marco van Wieringen Date: Sat, 3 Apr 2010 21:00:29 +0000 (+0200) Subject: Lets close the session based on session_id so we close the session we want to close... X-Git-Tag: Release-5.0.2~114 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f3c6e021a48cff1bf5337eca37f471b2bb58a204;p=bacula%2Fbacula Lets close the session based on session_id so we close the session we want to close not just an active connection. --- diff --git a/bacula/src/cats/myingres.sc b/bacula/src/cats/myingres.sc index 898a9a61fb..cf1678dce0 100644 --- a/bacula/src/cats/myingres.sc +++ b/bacula/src/cats/myingres.sc @@ -591,10 +591,14 @@ INGconn *INGconnectDB(char *dbname, char *user, char *passwd) void INGdisconnectDB(INGconn *dbconn) { - /* - * TODO: check for any real use of dbconn: maybe whenn multithreaded? - */ - EXEC SQL DISCONNECT; + EXEC SQL BEGIN DECLARE SECTION; + int sess_id; + EXEC SQL END DECLARE SECTION; + + sess_id = dbconn->session_id; + + EXEC SQL DISCONNECT SESSION :sess_id; + if (dbconn != NULL) { free(dbconn->msg); free(dbconn);