253 Commits

Author SHA1 Message Date
Sergey Safarov
df1ab07ca4 FS-9924: Removed extra space in source files 2017-02-09 23:59:49 -05:00
Anthony Minessale
6fe1deda45 swigall 2017-01-09 16:57:52 -06:00
Mike Jerris
f2792c9ea5 swigall 2017-01-06 17:13:39 -06:00
Brian West
48fab6f6db FS-9851: [freeswitch-core] Add abstimeout to CoreSession:getDigits in switch_cpp #resolve 2016-12-14 14:06:20 -06:00
Alexey Melnichuk
672b5d8309 FS-9821 [mod_lua] Fix. memory/resource leak in mod_lua 2016-12-07 21:56:22 +03:00
Aron Podrigal
d3201c6335 FS-9741: lua expose db err str in freeeswitch.dbh
Added 2 methods to lua freeswitch.Dbh
`last_error()` Returns the error string from the last query or nil.
`clear_error()` clears the error string.
2016-11-21 21:11:03 +00:00
Anthony Minessale
9b8a5edd3d FS-9638 2016-11-10 12:09:00 -06:00
Mark Lipscombe
4e9977507d FS-8537: Passing nil to various lua functions causes segfault
Various functions exposed via lua do not check their parameters for null
causing freeswitch to segfault.

This change adds checking for null parameters and returns an error
instead of segfaulting.
2015-11-15 10:43:09 +11:00
Mike Jerris
49f5cede85 FS-7966: silence mod_lua build warnings in generated code 2015-09-02 15:55:01 -04:00
Michael Jerris
dc80dbc8f3 FS-7966: don't manually edit generated source 2015-09-02 14:48:42 -05:00
Mike Jerris
46c0d05216 FS-7966: fix more msvc 2015 build warnings. 2015-09-02 13:07:17 -04:00
Mike Jerris
d698492aaf Merge pull request #457 in FS/freeswitch from ~LEKENSTEYN/freeswitch:bugfix/FS-8099-lua-dialplan to master
* commit '7749a9f51d57266f42adc0cf25d8f885ebad382d':
  Restore LUA dialplan ACTIONS functionality
2015-08-31 17:06:48 -05:00
Michael Jerris
164c6111a1 FS-7966: remove some older versions of msvc build system as these will no longer work soon, please use 2015 instead 2015-08-31 10:19:10 -05:00
Peter Wu
7749a9f51d Restore LUA dialplan ACTIONS functionality
Since using SWIG 2.0 to generate the code, two new items have been
pushed on the stack. Use relative stack indices to avoid breakage.

FS-8099 #resolve
2015-08-30 22:34:49 +02:00
Michael Giagnocavo
5e456fe9a6 FS-7966. First pass at moving to Visual Studio 2015.
The new C compiler breaks a lot of things. snprintf and timespec now exist, and redefining causes an error.
Many more things are warnings, so warnings-as-errors will fail - remove it from some projects for now.
V8: don't pass VS version to build batch file.
mod_sofia: Config has too-long if/elseif chain. Break this up to avoid "parser stack overflow; program too complex".
Add mod_conference.h to project and dir to includes.
2015-08-21 18:28:32 -04:00
Chris Rienzo
a0b53d06f5 FS-7912 add session UUID to lua error logs, if known. 2015-07-29 14:43:34 -04:00
Anthony Minessale
e34b195988 FS-7689 #resolve 2015-06-19 13:23:04 -05:00
Michael Giagnocavo
f116387443 FS-7644. Change 2013.vcxproj references to 2013 2015-06-18 04:17:53 -06:00
Brian West
4e88d9eea1 update languages to use swig2.0 and reswig 2015-06-16 12:44:37 -05:00
Brian West
34f5994aa2 swigall 2015-06-16 11:23:25 -05:00
Jeff Lenk
345e50d25a FS-7644 2015-06-11 15:29:28 -05:00
Michael Jerris
2cc0348422 FS-7635: remove msvc 2005 2008 and 2010 non working build systems. There are now multiple more recent (3 different ones) and some free versions of the compiler that can be used. 2015-06-10 16:33:14 -04:00
Anthony Minessale
452a4c1b05 swigall 2015-04-27 12:35:38 -05:00
Anthony Minessale
3058709a92 swigall 2015-04-25 14:15:26 -05:00
Brian West
861961bd4d FS-7180: when using system lua, properly link against reanmed library versions on debian for mod_lua 2015-01-20 13:18:12 -06:00
Michael Jerris
749ced5f60 FS-7180: add --enable-sytem-lua configure arg to allow building mod_lua against system lua and allow mod_lua to build against lua 5.1 or 5.2 2015-01-20 13:03:06 -05:00
Michael Jerris
07d09b7869 FS-7180: add --enable-sytem-lua configure arg to allow building mod_lua against system lua and allow mod_lua to build against lua 5.1 or 5.2 2015-01-20 11:48:00 -05:00
Mike Jerris
e86d359443 Merge pull request #57 in FS/freeswitch from ~LEKENSTEYN/freeswitch:fixes to master
* commit '8e4423f126b9476123c6fa8c41c5f8ebfe1d0cb5':
  Document Dbh.test_reactive, return saner values
2014-11-06 11:48:12 -06:00
Anthony Minessale
1bb0b8e16d fix leak in lua when script does not execute properly in xml_binding handler 2014-09-23 03:57:04 +05:00
Peter Wu
8e4423f126 Document Dbh.test_reactive, return saner values
In the FreeSWITCH core, the return value of switch_case_db_test_reactive
is ignored, but it is usable in LUA modules (and other bindings via
SWIG). The LUA API example[1] shows how to check the return value, but
that example miserably fails if the database did not exist before.

Changes:

 - Document the expected behavior of the test_reactive function.
 - Assert that test_sql and sql_reactive are both given. If either
   query is not given, the caller is using the wrong API.
 - When SCF_AUTO_SCHEMAS is cleared, use the return value of the
   test_sql execution. Does anybody use this? Why not remove it?
 - Do not unconditionally return SWITCH_FALSE when test_sql fails,
   instead allow it to become SWITCH_TRUE when reactive_sql passes.
 - Remove the unnecessary test_sql check for SCDB_TYPE_CORE_DB
   (this is now enforced through an assert check). (+reindent)
 - Clarify the error message of drop_sql, prepending "Ignoring" to
   the "SQL ERR" message.
 - LUA: Do not print "DBH NOT Connected" if the query fails. This was
   the initial source of confusion.

 [1]: https://confluence.freeswitch.org/display/FREESWITCH/Lua+API+Reference
2014-09-15 15:39:08 +02:00
Seven Du
59cd3c77d8 FS-6796 #resolve hack mod_lua to read correct binary string 2014-09-06 19:38:40 +08:00
Seven Du
d8bc5ed7ae swigall 2014-09-06 07:18:38 +08:00
Seven Du
1a4e6e3093 FS-6796 #comment avoid use c++ string since it causing troubles 2014-09-06 07:18:38 +08:00
Seven Du
a80f1d3524 swig all 2014-09-04 10:31:23 +08:00
Seven Du
1f26712330 swig hack 2014-09-04 10:13:45 +08:00
Seven Du
31f78d8cac add ability to read from a stream
do not use this unless you understand what you are doing and you want to take the risk,
you are warnned
2014-09-04 09:45:16 +08:00
Travis Cross
75836b603f Suppress diff output for swig-generated files 2014-08-30 03:22:59 +00:00
Anthony Minessale
3a00260dc6 FS-6615 test this patch 2014-07-16 19:33:10 +05:00
Travis Cross
aab164b3e6 make swigall 2014-07-16 03:52:09 +00:00
Brian West
4042571003 swigall 2014-07-15 19:09:24 -05:00
Michael Jerris
9f7399c272 FS-6293: fix lua to build using automake, so it works right with srcdir, and avoids the linking to .a is not portable warning 2014-03-18 13:28:52 -04:00
Michael Jerris
048ce8d1f3 FS-6293: srcdir builds, most of the built in mods work now 2014-03-14 23:13:34 -04:00
Anthony Minessale
99765fbd9a FS-6241 --resolve 2014-02-20 01:25:12 +05:00
Ken Rice
6e7d5d0897 update copyright header for 2014 2014-02-12 12:08:56 -06:00
Jeff Lenk
6dca277ed1 fix compiler error with last commit 2014-02-04 15:36:13 -06:00
Michael Jerris
1f2b632aee FS-5999: set visibility on lua symbols that are supposed to be exported 2014-02-04 16:09:08 -05:00
Peter Olsson
5a820fdc78 Disabled some compiler warnings on Windows build (for Visual Studio 2012), also disabled code analysis one some projects. This should make the Windows build more clean in the future. 2014-01-22 22:47:11 +01:00
Anthony Minessale
b63bacf43f FS-6061 swigall 2013-12-23 22:43:48 +05:00
Jeff Lenk
cec4b78d53 fix windows build for lua 5.2 VS2010 2013-11-13 19:42:52 -06:00
Jeff Lenk
7fb68faa55 fix windows build for lua 5.2 2013-11-13 18:06:12 -06:00