From ca46dfcbeeff0bdea2dfa387d7f60bde33c5a6e9 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Sun, 13 Apr 2014 06:28:37 +0000 Subject: [PATCH] Fix a nil variable concatentation error on user_status --- resources/install/scripts/app/user_status/index.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/install/scripts/app/user_status/index.lua b/resources/install/scripts/app/user_status/index.lua index ecdd97c6e4..ff7523ad5a 100644 --- a/resources/install/scripts/app/user_status/index.lua +++ b/resources/install/scripts/app/user_status/index.lua @@ -143,7 +143,6 @@ user_uuid = row.user_uuid; username = row.username; user_status = row.user_status; - freeswitch.consoleLog("NOTICE", "[call_center] user_status: ".. user_status .. "\n"); if (user_status == "Available") then action = "logout"; status = 'Logged Out'; @@ -151,6 +150,7 @@ action = "login"; status = 'Available'; end + freeswitch.consoleLog("NOTICE", "[call_center] user_status: ".. status .. "\n"); --set the user_status in the users table sql = "UPDATE v_users SET "; @@ -199,7 +199,9 @@ end); --send the status to the display - reply = api:executeString("uuid_display "..uuid.." '"..status.."'"); + if (status ~= nil) then + reply = api:executeString("uuid_display "..uuid.." '"..status.."'"); + end --set the session sleep to give time to see the display if (session:ready()) then