[Freeswitch-users] Strange error message
Nik Middleton
nik.middleton at noblesolutions.co.uk
Tue Feb 10 13:04:21 PST 2009
Hi Guys,
I'm baffled by this error. I'm updating the db on call hang-up If I
comment out curs:close() no error, but I'm concerned about memory leaks.
Can anyone tell me what FS is complaining about?
The db gets updated in both cases
Regards
require "luasql.mysql"
function myHangupHook(s, status, arg)
freeswitch.consoleLog("info", " : They hung up on US!!!\n");
env = assert (luasql.mysql())
con = assert
(env:connect("xxxxl","xxxxxxxxx","pass","192.168.3.205"))
curs = assert (con:execute"UPDATE callers SET lastcall =
'BOB' WHERE id = 33292")
curs:close()
con:close()
env:close()
freeswitch.consoleLog("NOTICE", "myHangupHook: " .. status
.. "\n");
--error()
end
2009-02-10 20:53:20 [INFO] switch_cpp.cpp:1086 console_log() : They
hung up on US!!!
2009-02-10 20:53:20 [ERR] mod_lua.cpp:176 lua_parse_and_execute()
/usr/local/freeswitch/scripts/helloworld.lua:50: attempt to index global
'curs' (a number value)
stack traceback:
/usr/local/freeswitch/scripts/helloworld.lua:50: in function
</usr/local/freeswitch/scripts/helloworld.lua:45>
[C]: in function 'hangup'
/usr/local/freeswitch/scripts/helloworld.lua:70: in main chunk
2009-02-10 20:53:20 [NOTICE] switch_core_session.c:957
switch_core_session_thread() Session 63
(sofia/internal/1001 at 192.168.3.206) Ended
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090210/82e04d3a/attachment-0001.html
More information about the Freeswitch-users
mailing list