Kevin P. Fleming
472c1ca282
simplify autoconfig include mechanism (make tholo happy he can use lint again :-)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 18:54:56 +00:00
Kevin P. Fleming
eb38f13a2e
add a command-line flag and option to force forking, even with -v or -d
...
rename a flag to have the proper name
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 14:55:05 +00:00
Luigi Rizzo
2d0ff2cf1a
Replace three replicas of the same code with a function.
...
Consider NULL and "" as equivalent in cid strings.
On passing, also remove an extra data copy.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 09:54:23 +00:00
Luigi Rizzo
e43bc6634d
This rather large commit changes the way modules are loaded.
...
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-14 14:08:19 +00:00
Luigi Rizzo
e245d3a975
+ create function cdr_get_tv to replace several duplicated
...
instances of the same code to generate a time entry in
raw or localtime format;
+ create functions check_post() and check_start() to check whether
a record has been already posted or started, replacing
several duplicated instances of the same code;
+ localize some variables;
+ normalize some for() loops
Especially the former two changes should make the code a lot
more consistent and easier to read.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 16:01:56 +00:00
Russell Bryant
d0b003a427
conversions to S_OR (issue #6803 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-26 16:08:42 +00:00
Joshua Colp
6cda4c3b8b
Merged revisions 14234 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r14234 | file | 2006-03-22 17:38:32 -0400 (Wed, 22 Mar 2006) | 2 lines
Issue #5918 - Disposition showing FAILED even though call is answered successfully (Reported by tracinet)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 21:43:38 +00:00
Russell Bryant
cde3711d7c
Furthermore, set the disposition to FAILED if the CDR was never even started
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-15 22:04:49 +00:00
Russell Bryant
62d5f5a7ea
don't calculate a duration if the CDR wasn't started, as it will result in a
...
totally bogus value. Thanks, Luigi! :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-15 21:59:08 +00:00
Russell Bryant
1bcfff48e4
remove calculations that always evaluate to zero, thanks Luigi!
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-15 00:29:25 +00:00
Russell Bryant
4e6af293f9
add an option to cdr.conf that enables ending CDRs before executing
...
the "h" extension as opposed to afterwards (issue #6193 )
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 16:49:34 +00:00
Tilghman Lesher
c6f691fbcc
Merged revisions 11503 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r11503 | tilghman | 2006-03-01 11:41:52 -0600 (Wed, 01 Mar 2006) | 2 lines
Bug 6615 - Fix 64bit conversion errors by using a long int
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-01 17:53:05 +00:00
Tilghman Lesher
53936916ec
Bug 6417 - Allow retrieval of raw CDR values
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 23:12:41 +00:00
Kevin P. Fleming
a1e703fb01
more memory allocation wrapper conversion
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 01:48:54 +00:00
Tilghman Lesher
f1209276fd
Bug 4377 - Initial round of loader changes
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 23:08:06 +00:00
Kevin P. Fleming
99f10b2e26
Merged revisions 9493,9528 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r9493 | bweschke | 2006-02-11 00:29:34 -0600 (Sat, 11 Feb 2006) | 3 lines
kpfleming's fix from r9472 backported to 1.2
........
r9528 | kpfleming | 2006-02-11 09:22:55 -0600 (Sat, 11 Feb 2006) | 2 lines
clean up my mess from thread-starting change
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 15:27:38 +00:00
Kevin P. Fleming
cadfcdfe8e
Merged revisions 9404 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r9404 | kpfleming | 2006-02-10 14:38:59 -0600 (Fri, 10 Feb 2006) | 2 lines
don't create monitor threads in detached mode, when we need to be able to pthread_join() them later if the module is unloaded (solve crash-on-unload problem for these channel modules)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-10 20:40:00 +00:00
Kevin P. Fleming
a16ae226b6
use string fields for some stuff in ast_channel
...
const-ify some more APIs
remove 'type' field from ast_channel, in favor of the one in the channel's tech structure
allow string field module users to specify the 'chunk size' for pool allocations
update chan_alsa to be compatible with recent const-ification patches
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-01 23:05:28 +00:00
Russell Bryant
d904a19e56
doxygen tweak
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 12:11:11 +00:00
Russell Bryant
a725468381
update doxygen docs to specify authors
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-30 21:18:06 +00:00
Tilghman Lesher
9b166d3319
Merged revisions 7521 via svnmerge from
...
/branches/1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-19 05:42:55 +00:00
Kevin P. Fleming
2c65582b66
remove extraneous svn:executable properties
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 18:24:39 +00:00
Russell Bryant
df53606847
remove duplicate list of cdr variable names (issue #5865 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 05:45:35 +00:00
Russell Bryant
d8dfa4434d
finish merging doxygen updates from issue #5605
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-14 19:00:38 +00:00
Russell Bryant
7d4a5abb1d
Convert some built-in applications to use new args parsing macros.
...
Change ast_cdr_reset to take a pointer to an ast_flags structure instead of an integer for flags.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-06 21:00:35 +00:00
Kevin P. Fleming
a0cb07e467
add 'ast_cond_t' type for pthread condition variables, and appropriate API wrappers
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-28 16:35:43 +00:00
Mark Spencer
f8c90f03b8
Fix CDR crash (bug #5525 and many others)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-27 21:57:53 +00:00
Russell Bryant
a736096e0b
change ast_strlen_zero to also check for the string to be defined
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-26 18:54:24 +00:00
Russell Bryant
3453e3efa5
Doxygen documentation update from oej (issue #5505 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-24 20:12:06 +00:00
Kevin P. Fleming
5da915dcfd
update MANY more files with proper copyright/license info (thanks Ian!)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-09-14 20:46:50 +00:00
Kevin P. Fleming
957eed7682
eliminate compiler warnings when DEBUG_THREADS is enabled
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-09 15:37:33 +00:00
Kevin P. Fleming
f358db3d43
use CDR API calls instead of re-implementing them (bug #4726 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-07-25 22:56:18 +00:00
Kevin P. Fleming
22b0f5d306
add a library of timeval manipulation functions, and change a large number of usses to use the new functions (bug #4504 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-07-15 23:00:47 +00:00
Kevin P. Fleming
0111a38e4b
ensure globals are all static
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-07-08 21:09:38 +00:00
Russell Bryant
c65d75dac5
super crazy ast_copy_string conversion madness!
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-07-07 23:46:10 +00:00
Kevin P. Fleming
f268ea2b3c
make CLI output use singular/plural when appropriate (bug #4654 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-07-07 22:32:20 +00:00
Kevin P. Fleming
11ea6fe59f
use ast_build_string() to build strings into buffers, and general cleanup of variable serializing functions used by 'show channel' (bug #4558 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-20 23:37:01 +00:00
Kevin P. Fleming
9e12e429f6
minor fixes to conform to the newly-posted coding guideline :-)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-17 12:51:03 +00:00
Mark Spencer
ac4ac37df1
Fix reset cdr (bug #4531 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-17 00:37:43 +00:00
Kevin P. Fleming
80fe4e16b2
ensure proper variables are returned from CDR function (bug #4521 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-15 15:01:40 +00:00
Kevin P. Fleming
86511f89fb
don't use pthread_mutex_lock
...
don't double-include pthread.h in utils.h, which can cause the
pthread_mutex_lock warning to not be generated on some systems
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-14 14:45:51 +00:00
Kevin P. Fleming
2b8338cb52
more file version tags
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-06 22:12:19 +00:00
Kevin P. Fleming
0e6762dd5f
remove experimental module version tags
...
add per-file revision tags and 'show version files' CLI command
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-06 20:27:51 +00:00
Kevin P. Fleming
23472dd2c0
support configurable batch posting of CDRs (off by default) (bug #3883 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-03 01:42:31 +00:00
Mark Spencer
41e7cc8154
Use defined AST_MAX_ACCOUNT_CODE (bug #4350 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-05-25 17:18:05 +00:00
Kevin P. Fleming
219541b5e0
various fixes:
...
use linked list macros for managing backend list (inspired by bug #4258 )
use ast_copy_string instead of strncpy when appropriate
minor fixes and formatting cleanup
add AST_LIST_HEAD_STATIC and AST_LIST_REMOVE_CURRENT macros
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-05-15 02:42:59 +00:00
Anthony Minessale II
6b7677e842
expose function execution routines and warn about trying to set a read-only cdr var
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-05-05 15:07:49 +00:00
Kevin P. Fleming
199add9567
phase 1 of header include cleanup (bug #4067 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5498 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-04-22 13:11:34 +00:00
Kevin P. Fleming
1f9ab2380a
use double-quotes instead of angle-brackets for non-system include files (bug #4058 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-04-21 06:02:45 +00:00
Russell Bryant
7bffc0459c
add missing newlines, fix misspelling of nonexistent (bug #4027 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-04-13 23:33:47 +00:00