Commit Graph

61 Commits

Author SHA1 Message Date
Boris P. Korzun 740c773781 pbx_lua: Remove compiler warnings
Improved variable definitions (specified correct type) for avoiding
compiler warnings.

ASTERISK-30117 #close

Change-Id: I3b00c1befb658ee9379ddabd9a9132765ca9201a
2022-07-06 16:04:14 -05:00
Alexander Traud cc025026b7 progdocs: Fix for Doxygen, the hidden parts.
ASTERISK-29779

Change-Id: If338163488498f65fa7248b60e80299c0a928e4b
2021-12-02 10:37:38 -06:00
Josh Soref ccb8b8ffbf pbx: Spelling fixes
Correct typos of the following word families:

process
populate
with
africa
accessing
contexts
exercise
university
organizations
withhold
maintaining
independent
rotation
ignore
eventname

ASTERISK-29714

Change-Id: I90eacc5bc3dcf75a9c898cfb85164f37dec08345
2021-11-15 18:30:07 -06:00
Christof Lauber 9c9f314f64 pbx_lua: Support displaying lua error message if no debug table exists
The lua_error_function assumed that lua's debug table and traceback function
are always accessible, which is not the case. This fixes the error message
'Error in the lua error handler' triggred by switch exec() function.
If this happens lua's error message is shown without traceback.

Change-Id: I34ba0a098f1ae06a3af7b4d1b098bd43f42f96c8
2018-04-30 10:31:34 +02:00
Alexander Traud 7e9781c25e General: Silence modules on (un)load.
Some (normally optional) modules created notices, warnings, and even errors
in normal situations like (un)load. This cluttered the command-line interface
(CLI) on start and while stopping gracefully. However, when an user went for
the script './contrib/scripts/install_prereq', those modules get compiled-in
because their prerequisites were met at compile time. Furthermore, because of
ASTERISK_27475, the former talkative module 'res_curl' is built as side-effect.

ASTERISK-27553

Change-Id: I9f105f46d72553994e820679bfde3478a551b281
2018-01-06 20:13:07 -06:00
Sean Bright fd0ca1c3f9 Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-12-22 09:23:22 -05:00
Jonathan R. Rose d96e350256 core/pbx: dialplan show - display filename/line#
Adds the ability for extensions to be registered to include filename and
line number so that dialplan show output can show the filename and line
number of a config file responsible for generating a given extension.

This only affects config modules that are written to use the new extension
registering functions. In this patch, that only includes pbx_config, so
extensions registered in extensions.conf and any included extension will
be shown in this manner. Extensions registered in this manner will show
the filename and line number *instead* of the registrar.

ASTERISK-26658 #close
Reported by: Jonathan R. Rose

Change-Id: Ieccc6abccdff34ed5c7da3511fd24972b8f2dd30
2017-01-04 14:06:20 -06:00
Dennis Guse ead773f801 pbx_lua: On configuration errors report module load failure instead of decline.
Switched from AST_MODULE_LOAD_DECLINE to AST_MODULE_LOAD_FAILURE.
Therefore, if pbx_lua fails to load and pbx_lua is marked as required,
Asterisk exits as expected.
If extensions.lua cannot be opened, AST_MODULE_LOAD_DECLINE is reported.

Change-Id: I8e5a0037e69b41743db60c568541ebb2f52a7a8f
2016-11-23 23:15:35 +01:00
Corey Farrell a6e5bae3ef Remove ASTERISK_REGISTER_FILE.
ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes
all traces of it.

Previously exported symbols removed:
* __ast_register_file
* __ast_unregister_file
* ast_complete_source_filename

This also removes the mtx_prof static variable that was declared when
MTX_PROFILE was enabled.  This variable was only used in lock.c so it
is now initialized in that file only.

ASTERISK-26480 #close

Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
2016-10-27 09:53:55 -04:00
Rodrigo Ramírez Norambuena eec010829a AST_MODULE_INFO: Format corrections to the usages of AST_MODULE_INFO macro.
Change-Id: Icf88f9f861c6b2a16e5f626ff25795218a6f2723
2015-05-13 16:34:23 -05:00
Matt Jordan 4a58261694 git migration: Refactor the ASTERISK_FILE_VERSION macro
Git does not support the ability to replace a token with a version
string during check-in. While it does have support for replacing a
token on clone, this is somewhat sub-optimal: the token is replaced
with the object hash, which is not particularly easy for human
consumption. What's more, in practice, the source file version was often
not terribly useful. Generally, when triaging bugs, the overall version
of Asterisk is far more useful than an individual SVN version of a file. As a
result, this patch removes Asterisk's support for showing source file
versions.

Specifically, it does the following:

* Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
  remove passing the version in with the macro. Other facilities
  than 'core show file version' make use of the file names, such as
  setting a debug level only on a specific file. As such, the act of
  registering source files with the Asterisk core still has use. The
  macro rename now reflects the new macro purpose.

* main/asterisk:
  - Refactor the file_version structure to reflect that it no longer
    tracks a version field.
  - Remove the "core show file version" CLI command. Without the file
    version, it is no longer useful.
  - Remove the ast_file_version_find function. The file version is no
    longer tracked.
  - Rename ast_register_file_version/ast_unregister_file_version to
    ast_register_file/ast_unregister_file, respectively.

* main/manager: Remove value from the Version key of the ModuleCheck
  Action. The actual key itself has not been removed, as doing so would
  absolutely constitute a backwards incompatible change. However, since
  the file version is no longer tracked, there is no need to attempt to
  include it in the Version key.

* UPGRADE: Add notes for:
  - Modification to the ModuleCheck AMI Action
  - Removal of the "core show file version" CLI command

Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2015-04-13 03:48:57 -04:00
George Joseph 3e5ab6ca39 pbx_lua: fix regression with global sym export and context clash by pbx_config.
ASTERISK-23818 (lua contexts being overwritten by contexts of the same name in
pbx_config) surfaced because pbx_lua, having the AST_MODFLAG_GLOBAL_SYMBOLS
set, was always force loaded before pbx_config.  Since I couldn't find any
reason for pbx_lua to export it's symbols to the rest of Asterisk, I simply
changed the flag to AST_MODFLAG_DEFAULT.  Problem solved.  What I didn't
realize was that the symbols need to be exported not because Asterisk needs
them but because any external Lua modules like luasql.mysql need the base
Lua language APIs exported (ASTERISK-17279).

Back to ASTERISK-23818...  It looks like there's an issue in pbx.c where
context_merge was only merging includes, switches and ignore patterns if
the context was already existing AND has extensions, or if the context was
brand new.  If pbx_lua is loaded before pbx_config, the context will exist
BUT pbx_lua, being implemented as a switch, will never place extensions in
it, just the switch statement.  The result is that when pbx_config loads,
it never merges the switch statement created by pbx_lua into the final
context.

This patch sets pbx_lua's modflag back to AST_MODFLAG_GLOBAL_SYMBOLS and adds
an "else if" in context_merge that catches the case where an existing context
has includes, switchs or ingore patterns but no actual extensions.

ASTERISK-23818 #close
Reported by: Dennis Guse
Reported by: Timo Teräs
Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3891/
........

Merged revisions 420146 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 420147 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 420148 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-06 16:12:26 +00:00
Mark Michelson dcf1ad14da Add module support level to ast_module_info structure. Print it in CLI "module show" .
ASTERISK-23919 #close
Reported by Malcolm Davenport

Review: https://reviewboard.asterisk.org/r/3802



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-25 16:47:17 +00:00
George Joseph 67021bfa07 Remove the problematic and unneeded AST_MODFLAG_GLOBAL_SYMBOLS from pbx_lua.c
AST_MODFLAG_GLOBAL_SYMBOLS was causing the module to be incorrectly loaded
before pbx_config.  pbx_config was therefore blowing away contexts that were
created by pbx_lua.  With AST_MODFLAG_DEFAULT the load order is now correct
and contexs are being properly merged.  AST_MODFLAG_GLOBAL_SYMBOLS was not
needed anyway since no other modules needed its global symbols that early.

ASTERISK-23818 #close
Reported by: Dennis Guse
Tested by: Dennis Guse
Tested by: George Joseph

Review: https://reviewboard.asterisk.org/r/3629/
........

Merged revisions 416668 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 416669 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-19 16:04:36 +00:00
Kinsey Moore 537f4a9dac pbx_lua: Add support for Lua 5.2
This adds support for Lua 5.2 in pbx_lua which is available on newer
operating systems.

(closes issue ASTERISK-23011)
Review: https://reviewboard.asterisk.org/r/3075/
Reported by: George Joseph
Patch by: George Joseph
........

Merged revisions 405090 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 405091 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 405124 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-08 16:34:24 +00:00
Matthew Jordan 8018b879a2 Clean up doxygen warnings
This patch fixes numerous doxygen warnings across Asterisk.  It also updates
the makefile to regenerate the doxygen configuration on the local system
before running doxygen to help prevent warnings/errors on the local system.

Much thanks to Andrew for tackling one of the Asterisk janitor projects!

(issue ASTERISK-20259)
Reported by: Andrew Latham
Patches:
  doxygen_partial.diff uploaded by Andrew Latham (license 5985)
  make_progdocs.diff uploaded by Andrew Latham (license 5985)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-30 14:23:28 +00:00
Kinsey Moore 9b16c8b0f6 Clean up and ensure proper usage of alloca()
This replaces all calls to alloca() with ast_alloca() which calls gcc's
__builtin_alloca() to avoid BSD semantics and removes all NULL checks
on memory allocated via ast_alloca() and ast_strdupa().

(closes issue ASTERISK-20125)
Review: https://reviewboard.asterisk.org/r/2032/
Patch-by: Walter Doekes (wdoekes)
........

Merged revisions 370642 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 370643 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31 20:21:43 +00:00
Sean Bright 99bd5b1e2e Eliminate a bunch of shadow warnings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-08 17:02:52 +00:00
Terry Wilson a9d607a357 Opaquify ast_channel structs and lists
Review: https://reviewboard.asterisk.org/r/1773/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29 16:52:47 +00:00
Terry Wilson 57f42bd74f ast_channel opaquification of pointers and integral types
Review: https://reviewboard.asterisk.org/r/1753/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20 23:43:27 +00:00
Terry Wilson 34c55e8e7c Opaquify char * and char[] in ast_channel
Review: https://reviewboard.asterisk.org/r/1733/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13 17:27:06 +00:00
Terry Wilson 04da92c379 Replace direct access to channel name with accessor functions
There are many benefits to making the ast_channel an opaque handle, from
increasing maintainability to presenting ways to kill masquerades. This patch
kicks things off by taking things a field at a time, renaming the field to
'__do_not_use_${fieldname}' and then writing setters/getters and converting the
existing code to using them. When all fields are done, we can move ast_channel
to a C file from channel.h and lop off the '__do_not_use_'.

This patch sets up main/channel_interal_api.c to be the only file that actually
accesses the ast_channel's fields directly. The intent would be for any API
functions in channel.c to use the accessor functions. No more monkeying around
with channel internals. We should use our own APIs.

The interesting changes in this patch are the addition of
channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to
channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to
use accessor functions when ast_channel is really opaque), and some re-working
of the way channel iterators/callbacks are handled so as to avoid creating fake
ast_channels on the stack to pass in matching data by directly accessing fields
(since "name" is a stringfield and the fake channel doesn't init the
stringfields, you can't use the ast_channel_name_set() function). I went with
ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a
setter.

The majority of the grunt-work for this change was done by writing a semantic
patch using Coccinelle ( http://coccinelle.lip6.fr/ ).

Review: https://reviewboard.asterisk.org/r/1655/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09 22:15:50 +00:00
Kinsey Moore 389ac0cff1 Fix lua goto detection to prevent unexpected behavior with confbridge
A bug in the pbx_lua goto detection was causing the dialplan to hangup
unexpectedly after confbridge exited if it had called lua dialplan code during
execution.

Patch-by: Timo Teras
Acked-by: Matt Nicholson
(closes issue ASTERISK-18976)
........

Merged revisions 349928 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-06 21:26:16 +00:00
Matthew Nicholson f39cbc004d only process args that exist
ASTERISK-18395
........

Merged revisions 341809 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 341810 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-21 16:42:56 +00:00
Matthew Nicholson 9c7a017540 don't limit the length of app and function arguments
ASTERISK-18395
........

Merged revisions 341806 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 341807 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@341808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-21 16:22:23 +00:00
Leif Madsen a525edea59 Merged revisions 328247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines
  
  Merged revisions 328209 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines
    
    Introduce <support_level> tags in MODULEINFO.
    This change introduces MODULEINFO into many modules in Asterisk in order to show
    the community support level for those modules. This is used by changes committed
    to menuselect by Russell Bryant recently (r917 in menuselect). More information about
    the support level types and what they mean is available on the wiki at
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14 20:28:54 +00:00
Matthew Nicholson 7a1204d129 Default to starting an autoservice in pbx_lua. The autoservice is
automatically stopped when applications are executed, so this shouldn't cause
any problems.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-06 19:14:39 +00:00
Matthew Nicholson d5e9ce9ab1 Make pbx_lua handle managing the autoservice better.
Make autoservice_start() and autoservice_stop() return nothing.  Also check if
the autoservice flag is set before starting or stopping the autoservice and
stop and start the autoservice when returning control to and getting control
from the pbx engine.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-06 19:01:57 +00:00
Matthew Nicholson bccba53bcf Detect Goto in pbx_lua.
This code will actually detect any dialplan jump from any application that
calls ast_explicit_goto().  This change is only being done in trunk as it may
change the way some dialplans execute.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-06 18:04:23 +00:00
Russell Bryant ea4d4dfabf Merged revisions 317476 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r317476 | russell | 2011-05-05 17:47:57 -0500 (Thu, 05 May 2011) | 8 lines
  
  Add a datastore fixup to fix a pbx_lua crash.
  
  (closes issue #19055)
  Reported by: jamhed
  Patches:
        lua_datastore_fixup1.diff uploaded by mnicholson (license 96)
  Tested by: mnicholson, jamhed
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 22:49:36 +00:00
Russell Bryant f0f5e237bf Merged revisions 317474 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r317474 | russell | 2011-05-05 17:36:33 -0500 (Thu, 05 May 2011) | 2 lines
  
  Fix more "set but unused" warnings.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 22:44:52 +00:00
Matthew Nicholson f6c2ebff45 Merged revisions 309585 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r309585 | mnicholson | 2011-03-04 13:38:25 -0600 (Fri, 04 Mar 2011) | 9 lines
  
  Merged revisions 309584 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r309584 | mnicholson | 2011-03-04 13:37:13 -0600 (Fri, 04 Mar 2011) | 2 lines
    
    Restore mysterious lua_pushvalue() call removed in r309494.  The mystery has been solved.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-04 19:38:59 +00:00
Matthew Nicholson 3ef45303e1 Merged revisions 309542 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r309542 | mnicholson | 2011-03-04 13:00:33 -0600 (Fri, 04 Mar 2011) | 11 lines
  
  Merged revisions 309541 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r309541 | mnicholson | 2011-03-04 12:59:20 -0600 (Fri, 04 Mar 2011) | 4 lines
    
    Check for errors from fseek() when loading config file, properly abort on errors from fread(), and supply a traceback for errors generated when loading the config file.
    
    Also, prepend a newline to traceback output so that the main error message is on it's own line.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-04 19:02:31 +00:00
Matthew Nicholson 8861d64ecc Merged revisions 309495 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r309495 | mnicholson | 2011-03-04 12:10:23 -0600 (Fri, 04 Mar 2011) | 9 lines
  
  Merged revisions 309494 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r309494 | mnicholson | 2011-03-04 11:55:57 -0600 (Fri, 04 Mar 2011) | 2 lines
    
    remove mysterious lua_pushvalue() that is never used
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-04 18:11:43 +00:00
Matthew Nicholson b20fecdbbb Add support for defining hints from pbx_lua
(closes issue #16024)
Reported by: mnicholson


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-04 17:44:44 +00:00
Matthew Nicholson 438ef2625a Merged revisions 309448 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r309448 | mnicholson | 2011-03-04 09:59:25 -0600 (Fri, 04 Mar 2011) | 8 lines
  
  Export global symbols from pbx_lua to allow modules to be loaded.  Fixes a regression introduced in r278132.
  
  (closes issue #18671)
  Reported by: Igels
  Patches:
        pbx_lua_global_symbols1.diff uploaded by mnicholson (license 96)
  Tested by: Igels
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-04 16:00:05 +00:00
Tilghman Lesher b4e18d5660 Add load priority order, such that preload becomes unnecessary in most cases
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20 19:35:02 +00:00
Tilghman Lesher a7498ae02e Use configure to determine the prefixes and include directories properly.
This ensures cross-platform compatibility, even among Linux distributions,
which don't always put headers in the same place.

(closes issue #17391)
 Reported by: loloski


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@265747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-26 00:29:40 +00:00
Matthew Nicholson a723865e5c Load pbx_lua with global symbols to allow linking with other lua libraries.
Found by Maxim Litnitskiy.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@231189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-25 15:42:48 +00:00
Tilghman Lesher 01fd08d5b9 If lua is detected with the lua5.1 prefix (or not), adjust the include path accordingly.
Based upon feedback to a release announcement on the -users list.  See
http://lists.digium.com/pipermail/asterisk-users/2009-August/236954.html


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@214819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-30 06:43:04 +00:00
Kevin P. Fleming 82fb56886e More 'static' qualifiers on module global variables.
The 'pglobal' tool is quite handy indeed :-)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-15 17:34:30 +00:00
Kevin P. Fleming bd4eb070f3 bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-02 18:52:13 +00:00
Steve Murphy 1c2b1eb928 (closes issue #13564)
Reported by: mnicholson
Patches:
      pbx_lua9.diff uploaded by mnicholson (license 96)

Many thanks to Matt for his upgrade to the lua dialplan
option! 

the Description from the bug:

This patch adds a stack trace to errors encountered while executing lua extensions. The patch also handles out of memory errors reported by lua.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-26 18:02:06 +00:00
Steve Murphy a36696f2e7 (closes issue #13559)
Reported by: mnicholson
Patches:
      pbx_lua8.diff uploaded by mnicholson (license 96)




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-25 21:54:11 +00:00
Steve Murphy 38028fa641 I added a little verbage to hashtab for the hashtab_destroy func.
It was pretty sparsely documented.

This update fleshes out the pbx_lua module, to 
add the switch statements to the extensions in the
extensions.lua file, as well as removing them when
the module is unloaded.

Many thanks to Matt Nicholson for his fine
contribution!




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-25 21:18:12 +00:00
Steve Murphy f8ddaae70b (closes issue #13558)
Reported by: mnicholson

Considering that the example extensions.lua used nothing but ["12345"] notation,
and that the resulting error message: 

[Sep 24 17:01:16] ERROR[12393]: pbx_lua.c:1204 exec: Error executing lua extension: attempt to call a nil value

is not very informative as to the nature of the problem, I think this bug
fix is a big win!





git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-25 17:51:11 +00:00
Kevin P. Fleming 7df8b8b848 make datastore creation and destruction a generic API since it is not really channel related, and add the ability to add/find/remove datastores to manager sessions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@135680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-05 16:56:11 +00:00
Kevin P. Fleming 71b3fd1ef7 various minor fixes created while i worked on getting *every* Asterisk module to build on laptop in dev mode:
remove weird pre-setting of LUA paths; they are not necessary; also use the proper path for including the files in pbx_lua.c

add searching for OpenAIS libraries in /usr/lib/openais if a path is not specified; not sure if this is really the optimal solution, but it works

make the compiler shut up about some ignored function results in pbx_gtkconsole; this module is badly coded anyway



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-29 16:19:29 +00:00
Russell Bryant 9eb8e7d665 Lock the channel around datastore access
(closes issue #12527)
Reported by: mnicholson
Patches:
      pbx_lua4.diff uploaded by mnicholson (license 96)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-25 22:04:46 +00:00
Jason Parker fc607d5be4 Update documentation for pbx_lua.
Closes issue #11492, patch by mnicholson.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 21:28:49 +00:00