summaryrefslogtreecommitdiff
path: root/res
AgeCommit message (Collapse)Author
2006-04-16more replaceemnt of dup code with functions.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16localize several variables, and simplify the last part of park_exec()Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16more formatting cleanup including removal of a useless checkLuigi Rizzo
for f == NULL git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16rename a variable same as used in a very similar function,Luigi Rizzo
to reduce code differences. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16s/pu->chan/chan in a few places;Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16put some common code into functions (still more instances to be replaced)Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16properly reindent a large block.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16more readability fixes - localize some variables and invertLuigi Rizzo
a condition in an 'if' statement to reduce the nesting depth. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16introduce a function to set context, extension and priorityLuigi Rizzo
replacing some common blocks of code (there are still a few instances where it can be used) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16minor readability fixes in preparation for more work on this file:Luigi Rizzo
- replace nested 'if' with '&&' - fix indentation - annotate the end brace of some huge block - remove useless parentheses git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15We are shaking up trunk tonight! allow data dir to be specified (issue #6967 ↵Joshua Colp
reported by tzafrir) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15- normalize for() loops to navigate through variables,Luigi Rizzo
removing replicated var = var->next; - remove a potential infinite loop and document the problem - remove useless checks and document why - mark XXX a possible bug (to be investigated) - use ast_strlen_zero() instead of expanding it inline - fix indentation in one place - replace a nested 'if' with '&&' git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14- remove some unnecessary casts and braces; Luigi Rizzo
- add braces around a nested 'if' - use S_OR and '?' to remove some duplicated function calls; - replace nested 'if' with && - move out a common term in a sequence of 'if' - add a comment on a potentially dangerous string manipulation git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14constification and code simplificationsLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14partial fix of the module API to use the new method.Luigi Rizzo
Still not complete as we need to take care of the usecount stuff. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14fix another svn merge bugLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14This rather large commit changes the way modules are loaded. Luigi Rizzo
As partly documented in loader.c and include/asterisk/module.h, modules are now expected to return all of their methods and flags into a structure 'mod_data', and are normally loaded with RTLD_NOW | RTLD_LOCAL, so symbols are resolved immediately and conflicts should be less likely. Only in a small number of cases (res_*, typically) modules are loaded RTLD_GLOBAL, so they can export symbols. The core of the change is only the two files loader.c and include/asterisk/module.h, all the rest is simply adaptation of the existing modules to the new API, a rather mechanical (but believe me, time and finger-consuming!) process whose detail you can figure out by svn diff'ing any single module. Expect some minor compilation issue after this change, please report it on mantis http://bugs.digium.com/view.php?id=6968 so we collect all the feedback in one place. I am just sorry that this change missed SVN version number 20000! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13Updates to speech recognition API and dialplan utilities. Moved to using ↵Joshua Colp
dialplan functions, and some other misc things. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19645 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11normalize code in preparation to module changesLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10Presenting a revised data stores and oh my, a generic speech recognition ↵Joshua Colp
API! I wonder what we can do with this now... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10Merged revisions 18866 via svnmerge from BJ Weschke
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r18866 | bweschke | 2006-04-10 12:29:51 -0500 (Mon, 10 Apr 2006) | 2 lines Don't say that we can pass an 'exten' argument in the documentation of Park() when we really cannot. #6902 (opsys) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10remove a couple more unnecessary "out of memory" error messagesRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10use ast_*alloc and don't create duplicated error messages.Russell Bryant
... as stated in the coding guidelines. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10Instead of using strncpy, use ast_copy_string. Also, in the case of copying aRussell Bryant
constant string into a buffer that we know is big enough, don't use a length limited copy at all, use strcpy. ... as stated in the coding guidelines. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10run the module through indent to fix the formatting issues that violate theRussell Bryant
coding guidelines git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10add back braces that were removed in a recent commit that leave a bunch ofRussell Bryant
nested statements in a block without branches, which is a violation of the coding guidelines. As a matter of fact, this module violates the coding guidelines in multiple ways that including formatting and code issues. In my opinion, this module should not have been merged into the trunk in this form. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-09Issue 6917 - some cleanups for res_config_pgsql.c (mithraen)Olle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08a few cleanups from the last commitKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08since the module API is changing, it's a good time to const-ify the ↵Kevin P. Fleming
description() and key() return values git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08fix bug in smdi config parsing (issue #6908)Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07Issue #6899 - remove OSP support code from chan_sip.c and app_dial.c Olle Johansson
- implement all functions through internal APIs in res_osp.c and app_osplookup.c (homesick) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06normalize repeated instances of code as follows:Luigi Rizzo
- if (res >= 0) - return RESULT_SUCCESS; - else - return RESULT_FAILURE; + return (res >= 0) ? RESULT_SUCCESS : RESULT_FAILURE; (we should probably create a macro for this, #define RET(r) ((r) >= 0) ? RESULT_SUCCESS : RESULT_FAILURE) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06use the new module interface for this module, but make itLuigi Rizzo
of type MOD_0 as it exports symbols so it should be loaded as RTLD_GLOBAL. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06Issue #6893 - Compiler warnings for PostgreSQL ARA driverOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05Unbreak res/Makefile (issue #6891 as reported by casper)Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05Issue #5637 - Realtime driver for PostgreSQL (mguesdon)Olle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05Bug 6873 - Finish moving from the non-threadsafe (and poor randomness) ↵Tilghman Lesher
rand() to threadsafe ast_random() git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30as discussed with Mark a few weeks ago, the 'newstack' argumentLuigi Rizzo
in pbx_exec is always 1 so it can be removed. This change also takes away ast_exec_extension(), and lets all switch functions (exists, canmatch, exec, matchmore) all use the same prototype, which makes the code a bit cleaner. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30Merged revisions 16534 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r16534 | file | 2006-03-30 13:55:28 -0400 (Thu, 30 Mar 2006) | 2 lines Do not exceed the array size for maximum allowed moh files. (issue #6842) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30do not export the tzlock and the list head, and introduce a new method,Luigi Rizzo
ast_walk_indications(), to walk through the list of indications. The new method returns an unlocked record, which is no different from the behaviour of other existing methods in indications.c (i.e. they all need to be fixed, with refcounts or some similar method). Note that ast_walk_indications() uses the pointer argument only as a search key, so its implementation is completely safe. In turn, this change allows the removal of AST_MUTEX_DEFINE_EXPORTED. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30Set default value of adsipark (import from 1.2)Olle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28use ast_cli_complete() to largely simplify the command completion code.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28Bring in the new loader code as described in mantis #4377Luigi Rizzo
and updated to today's version. The core of the patch is only two files, loader.c and include/asterisk/module.h, with the other files touched only to adapt non-standard usages of the reference counts and localuser lists. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28Use the standard macros to manipulate usecount.Luigi Rizzo
This is in preparation to the import of the new loader. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27Janitor work converting !ast_strlen_zero(a)?a:bMatt O'Gorman
to S_OR functions. from bug note 6805 with minor modifications. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25Add micro-http server and abstract manager interface, make snmp not die Mark Spencer
on reload. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25revert loader changes that have clearly not undergone adequate testing ↵Kevin P. Fleming
before commit git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25Bug 4377 - Round 2 of the loader updatesTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23Merged revisions 14523 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r14523 | file | 2006-03-23 17:51:50 -0400 (Thu, 23 Mar 2006) | 2 lines Issue #6764 - Return BUSY signal when other party is busy at Attended Transfer (Reported by mnachev) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21Merged revisions 13961 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r13961 | russell | 2006-03-21 13:21:47 -0500 (Tue, 21 Mar 2006) | 3 lines fix crash when using the ParkAndAnnounce application. When using this application, there will be no peer channel to play the parking announcement to. (issue #6756) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13962 65c4cc65-6c06-0410-ace0-fbb531ad65f3