rizzo
7eb73ddcb4
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: http://svn.digium.com/svn/asterisk/trunk@21786 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-21 09:54:23 +00:00
rizzo
3664249356
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: http://svn.digium.com/svn/asterisk/trunk@20003 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-14 14:08:19 +00:00
rizzo
95f46a6c20
+ 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: http://svn.digium.com/svn/asterisk/trunk@17878 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 16:01:56 +00:00
russell
ce80e21bd8
conversions to S_OR (issue #6803 )
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@15022 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-26 16:08:42 +00:00
file
5faebd5bd6
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: http://svn.digium.com/svn/asterisk/trunk@14235 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-22 21:43:38 +00:00
russell
bf0426953c
Furthermore, set the disposition to FAILED if the CDR was never even started
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@13160 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-15 22:04:49 +00:00
russell
850de97f71
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: http://svn.digium.com/svn/asterisk/trunk@13132 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-15 21:59:08 +00:00
russell
828186da1f
remove calculations that always evaluate to zero, thanks Luigi!
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@12995 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-15 00:29:25 +00:00
russell
9389382205
add an option to cdr.conf that enables ending CDRs before executing
...
the "h" extension as opposed to afterwards (issue #6193 )
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@12896 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-14 16:49:34 +00:00
tilghman
d723568b93
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: http://svn.digium.com/svn/asterisk/trunk@11504 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-01 17:53:05 +00:00
tilghman
d14ce4c739
Bug 6417 - Allow retrieval of raw CDR values
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10953 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-23 23:12:41 +00:00
kpfleming
ea305ad521
more memory allocation wrapper conversion
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10141 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-15 01:48:54 +00:00
tilghman
e1bdf6e7ef
Bug 4377 - Initial round of loader changes
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10084 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-14 23:08:06 +00:00
kpfleming
fa4d9273e4
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: http://svn.digium.com/svn/asterisk/trunk@9529 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-11 15:27:38 +00:00
kpfleming
e04e114ef1
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: http://svn.digium.com/svn/asterisk/trunk@9405 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-10 20:40:00 +00:00
kpfleming
21d21f89c0
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: http://svn.digium.com/svn/asterisk/trunk@9060 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-01 23:05:28 +00:00
russell
9242f99784
doxygen tweak
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7778 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-04 12:11:11 +00:00
russell
ab6566173e
update doxygen docs to specify authors
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7682 f38db490-d61c-443f-a65b-d21fe96a405b
2005-12-30 21:18:06 +00:00
tilghman
c27a8e3dba
Merged revisions 7521 via svnmerge from
...
/branches/1.2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7522 f38db490-d61c-443f-a65b-d21fe96a405b
2005-12-19 05:42:55 +00:00
kpfleming
24c1e3c222
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7221 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-29 18:24:39 +00:00
russell
19ef63026b
remove duplicate list of cdr variable names (issue #5865 )
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7217 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-29 05:45:35 +00:00
russell
8acbf04043
finish merging doxygen updates from issue #5605
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7096 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-14 19:00:38 +00:00
russell
28eb6d3482
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: http://svn.digium.com/svn/asterisk/trunk@6987 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-06 21:00:35 +00:00
kpfleming
f67cec6dcc
add 'ast_cond_t' type for pthread condition variables, and appropriate API wrappers
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6877 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-28 16:35:43 +00:00
markster
1d303db42e
Fix CDR crash (bug #5525 and many others)
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6869 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-27 21:57:53 +00:00
russell
1168964aa4
change ast_strlen_zero to also check for the string to be defined
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6862 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-26 18:54:24 +00:00
russell
2c3b3edc86
Doxygen documentation update from oej (issue #5505 )
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6847 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-24 20:12:06 +00:00
kpfleming
95fe2b8fd4
update MANY more files with proper copyright/license info (thanks Ian!)
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6596 f38db490-d61c-443f-a65b-d21fe96a405b
2005-09-14 20:46:50 +00:00
kpfleming
23a2111d40
eliminate compiler warnings when DEBUG_THREADS is enabled
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6313 f38db490-d61c-443f-a65b-d21fe96a405b
2005-08-09 15:37:33 +00:00
kpfleming
757aadd53d
use CDR API calls instead of re-implementing them (bug #4726 )
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6213 f38db490-d61c-443f-a65b-d21fe96a405b
2005-07-25 22:56:18 +00:00
kpfleming
ff15e0fa53
add a library of timeval manipulation functions, and change a large number of usses to use the new functions (bug #4504 )
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6146 f38db490-d61c-443f-a65b-d21fe96a405b
2005-07-15 23:00:47 +00:00
kpfleming
4f868cef84
ensure globals are all static
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6061 f38db490-d61c-443f-a65b-d21fe96a405b
2005-07-08 21:09:38 +00:00
russell
92832d9f32
super crazy ast_copy_string conversion madness!
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6056 f38db490-d61c-443f-a65b-d21fe96a405b
2005-07-07 23:46:10 +00:00
kpfleming
09ab7d67e4
make CLI output use singular/plural when appropriate (bug #4654 )
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6047 f38db490-d61c-443f-a65b-d21fe96a405b
2005-07-07 22:32:20 +00:00
kpfleming
ec0590611f
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: http://svn.digium.com/svn/asterisk/trunk@5944 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-20 23:37:01 +00:00
kpfleming
4e295a89c2
minor fixes to conform to the newly-posted coding guideline :-)
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5921 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-17 12:51:03 +00:00
markster
a938fdd1eb
Fix reset cdr (bug #4531 )
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5920 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-17 00:37:43 +00:00
kpfleming
09f5c8d4e6
ensure proper variables are returned from CDR function (bug #4521 )
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5916 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-15 15:01:40 +00:00
kpfleming
3ba563757d
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: http://svn.digium.com/svn/asterisk/trunk@5906 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-14 14:45:51 +00:00
kpfleming
6f0f46299c
more file version tags
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5866 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-06 22:12:19 +00:00
kpfleming
b2cbb6a75d
remove experimental module version tags
...
add per-file revision tags and 'show version files' CLI command
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5864 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-06 20:27:51 +00:00
kpfleming
46d0533b99
support configurable batch posting of CDRs (off by default) (bug #3883 )
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5823 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-03 01:42:31 +00:00
markster
ea6f06e9fb
Use defined AST_MAX_ACCOUNT_CODE (bug #4350 )
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5765 f38db490-d61c-443f-a65b-d21fe96a405b
2005-05-25 17:18:05 +00:00
kpfleming
85466027b8
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: http://svn.digium.com/svn/asterisk/trunk@5659 f38db490-d61c-443f-a65b-d21fe96a405b
2005-05-15 02:42:59 +00:00
anthm
d4dd060a57
expose function execution routines and warn about trying to set a read-only cdr var
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5589 f38db490-d61c-443f-a65b-d21fe96a405b
2005-05-05 15:07:49 +00:00
kpfleming
d6e1341f9b
phase 1 of header include cleanup (bug #4067 )
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5498 f38db490-d61c-443f-a65b-d21fe96a405b
2005-04-22 13:11:34 +00:00
kpfleming
31e8dcf4fe
use double-quotes instead of angle-brackets for non-system include files (bug #4058 )
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5490 f38db490-d61c-443f-a65b-d21fe96a405b
2005-04-21 06:02:45 +00:00
russell
9201aa9db0
add missing newlines, fix misspelling of nonexistent (bug #4027 )
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5467 f38db490-d61c-443f-a65b-d21fe96a405b
2005-04-13 23:33:47 +00:00
markster
25212ca9e8
Allow functions to be written to (bug #2278 , with mods)
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5296 f38db490-d61c-443f-a65b-d21fe96a405b
2005-03-29 06:16:49 +00:00
markster
6898f073de
Merge anthm's CDR updates (bug #3595 )
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5068 f38db490-d61c-443f-a65b-d21fe96a405b
2005-02-23 22:48:47 +00:00