From 02b2b9c5ea95c15c13966fee7d33701f91cb4f40 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Wed, 27 Mar 2013 07:07:00 +0000 Subject: [PATCH] Release the database connection before sending the caller into the conference. --- .../scripts/app/conference_center/index.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/includes/install/scripts/app/conference_center/index.lua b/includes/install/scripts/app/conference_center/index.lua index dab6c67286..333e156b35 100644 --- a/includes/install/scripts/app/conference_center/index.lua +++ b/includes/install/scripts/app/conference_center/index.lua @@ -150,6 +150,16 @@ --set the end epoch end_epoch = os.time(); + --connect to the database + --ODBC - data source name + if (dsn_name) then + dbh = freeswitch.Dbh(dsn_name,dsn_username,dsn_password); + end + --FreeSWITCH core db handler + if (db_type == "sqlite") then + dbh = freeswitch.Dbh("sqlite://"..db_path.."/"..db_name); + end + --get the conference sessions sql = [[SELECT count(*) as num_rows FROM v_conference_sessions @@ -295,6 +305,8 @@ end); end + --close the database connection + dbh:release(); end --make sure the session is ready @@ -431,6 +443,9 @@ freeswitch.consoleLog("INFO","conference_room_uuid: " .. conference_room_uuid .. "\n"); end + --close the database connection + dbh:release(); + --set the meeting uuid session:setVariable("meeting_uuid", meeting_uuid);