rizzo
50469fa174
normalize repeated instances of code as follows:
...
- 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: http://svn.digium.com/svn/asterisk/trunk@17899 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 16:17:04 +00:00
rizzo
7423105590
optimize move_variables() so that two lists can be created
...
in constant time instead of scanning the entire list.
On passing, minor formatting fixes.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17898 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 16:06:57 +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
rizzo
3ccdfaa009
minor code cleanup
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17867 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 15:55:15 +00:00
rizzo
25108e6dfb
convert one more file...
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17866 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 15:48:06 +00:00
rizzo
ea7a4e7d71
remove traces of previously merged files
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17865 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 15:43:06 +00:00
oej
e1dbe866be
Formatting fixes
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17864 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 15:41:37 +00:00
rizzo
5d1a483bbb
minor formatting cleanup and removal of trailing whitespace.
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17863 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 15:40:12 +00:00
oej
2200466f93
Formatting fixes
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17862 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 15:25:56 +00:00
oej
0bb8b48fbd
Formatting fixes
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17861 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 15:23:14 +00:00
rizzo
41cdedad1c
use the new module interface for this module, but make it
...
of type MOD_0 as it exports symbols so it should be loaded as RTLD_GLOBAL.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17860 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 15:10:29 +00:00
rizzo
02b7199043
make sure that file calls other than OPEN work on all formats
...
if called with a NULL 'fmt' argument.
(SVN 6898)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17859 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 15:08:31 +00:00
oej
ad3917f8ce
Make "show http" CLI command follow new guidelines - now "http show status"
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17828 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 14:43:06 +00:00
rizzo
6976601d47
whitespace and formatting fix postponed from last commit:
...
fix indentation of a large function, localize some variables
and add/remove whitespace where needed.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17827 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 14:40:47 +00:00
rizzo
865e3d129b
split pbx_load_module so we can reduce the indentation depth.
...
Also convert to MOD_1 style.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17825 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 14:23:37 +00:00
rizzo
218ae95065
use FREE instead of free as pointer to the destructor function.
...
This way the MALLOC_DEBUG code will always get the correct argument.
(bug introduced in SVN15818)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17824 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 14:02:19 +00:00
rizzo
f229a1fc56
convert a couple of applications to the new module style
...
(STATIC_MODULE) to show what needs to be changed.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17791 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 09:24:02 +00:00
rizzo
e74b126e91
small cleanups to module.h and loader.c to start playing with
...
new-style modules using static symbols.
Everything will still work as before, but new-style modules
can now be defined by putting a '#define STATIC_MODULE' somewhere
before including module.h, then declaring STATIC_MODULE the
various methods (load, unload, key...) that the module is
supposed to supply, and adding a 'STD_MOD(MOD_1, reload_fn, NULL, NULL)'
macro call at the end.
A module compiled in this way will be loaded RTLD_NOW|RTLD_LOCAL
so symbol pollution is reduced, and symbols are resolved immediately.
Removing just the '#define STATIC_MODULE' will restore the old
behaviour.
In order for a module to be loaded RTLD_NOW|RTLD_LOCAL, it must not
export any symbol[1], and all the modules it depends on (e.g. res_*)
must be loaded already.
[1] Mechanisms are in place, and will be enabled later, to still
allow such modules to 'export' symbols and resolving the dependencies
irrespective of the load order.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17790 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 09:10:31 +00:00
rizzo
4decf04093
the fix for bug #6399 makes sense. thanks wrmem for the report.
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17753 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 08:02:35 +00:00
oej
6f3da594d1
Issue #6893 - Compiler warnings for PostgreSQL ARA driver
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17740 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06 06:55:38 +00:00
oej
b2518377e0
Issue #6610 - build on Intel Mac
...
(Wish I could try this at home :-)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17735 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-05 20:14:51 +00:00
file
d49bf25588
Merged revisions 17702 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r17702 | file | 2006-04-05 17:01:19 -0300 (Wed, 05 Apr 2006) | 2 lines
Unlock channel on failure so that ast_mutex_destroy doesn't throw a fit (issue #6647 reported by casper)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17726 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-05 20:05:09 +00:00
oej
dffac97859
- Doxygen fixes
...
- Typos corrected
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17694 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-05 19:32:40 +00:00
file
5be1f729d8
Unbreak res/Makefile (issue #6891 as reported by casper)
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17661 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-05 18:37:29 +00:00
oej
6816f315c5
Issue #5637 - Realtime driver for PostgreSQL (mguesdon)
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17628 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-05 17:46:09 +00:00
tilghman
e0ba99b7f5
Bug 6873 - Finish moving from the non-threadsafe (and poor randomness) rand() to threadsafe ast_random()
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17627 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-05 17:44:44 +00:00
tilghman
54a140d030
Bug 6508 - if priority was a number, then findlabel fails
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17626 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-05 17:03:30 +00:00
crichter
4d9f5c0d2e
some final fixes for cpn
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17594 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-05 15:54:15 +00:00
crichter
b441bcd687
* advanced the error Handling routine for wrong frames from mISDN
...
* added more code for connected party number handling
* fixed the portinfo program, it can now be used to test mISDN again
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17562 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-05 14:51:48 +00:00
oej
bdfb487b8c
Add some documentation and a todo for enum.c
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17530 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-05 13:53:06 +00:00
oej
57e05b7e71
Issue #6654 : Enum crash on ADDRESS record, possibly bad record, but still a crash (imported from 1.2)
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17490 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-05 06:52:41 +00:00
oej
df8f2799b6
Add reference pointers to RFCs
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17488 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-05 06:43:14 +00:00
tilghman
70e60a12ae
Bug 6886 - Add application TryExec, which does mostly the same thing, but returns differently
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17454 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-05 03:53:41 +00:00
oej
4e1f438c27
Fix formatting
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17415 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04 19:48:42 +00:00
crichter
34628eb758
fixed some essential segfaults happening under heavy load. Added a bit more error handling if we receive wrong data form mISDN (e.g. if we crashed before => handle_err() ). Added first steps to implement the parseing of the connected party number.
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17404 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04 19:09:26 +00:00
oej
69ea4b21f3
Issue #6884 - manager.c formatting (casper)
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17389 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04 19:03:12 +00:00
oej
e74b0868ba
Formatting cleanup
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17369 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04 18:34:21 +00:00
oej
682823b14a
Block 17367 from trunk, since it's already fixed (me bad)
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17368 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04 18:30:31 +00:00
oej
731348a1de
Issue #6878 - Manager event DNDstate hidden under verbose option (casper)
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17366 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04 18:26:24 +00:00
oej
36b1ad24ac
- Don't return AST_DEVICE_UNKNOWN to devicestate engine, since this will
...
cause a channel walk...
- Doxygen fixed for devicestate.c
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17365 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04 18:24:41 +00:00
oej
e2b336affe
Issue #6882
...
- move "res=-1" out of verbose block.
- minor code cleanup
Imported from 1.2 branch
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17350 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04 18:02:40 +00:00
rizzo
3fe358d879
these files are now unused, corresponding functions are merged
...
into format_pcm.c
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17331 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04 17:13:37 +00:00
rizzo
60405e3ce3
remove an unused function.
...
Funny enough, compiling with -O6 gives no warning, whereas -O2 gives
a warning for an unused function declared static.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17330 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04 17:12:35 +00:00
mattf
49df167b76
chan_iax2 cleanups and optimizations ( #6858 )
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17329 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04 17:05:01 +00:00
mogorman
08a2f51b31
minor code clean up from 6880
...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17312 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04 16:59:27 +00:00
mogorman
12d8167b46
adds manager event when an iax2 peer loses registration.
...
also some minor code clean up. patch from 6868 with minor
changes.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17311 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04 16:15:40 +00:00
rizzo
0a1c1c5ec2
ogg_vorbis now compiles so put it back in.
...
On passing, remove an unnecessary initializazion in format_sln.c
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17285 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04 15:40:47 +00:00
mogorman
16bd637be2
Merged revisions 17283 via svnmerge from
...
https://svn.digium.com/svn/asterisk/branches/1.2
........
r17283 | mogorman | 2006-04-04 10:24:50 -0500 (Tue, 04 Apr 2006) | 3 lines
Adds documentation to show what the w flag.
Patch from Ian Kinner at Digium.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17284 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04 15:27:47 +00:00
rizzo
215411b450
temporarily disconnect ogg_vorbis from the build while i update it
...
(should be a matter of a couple of hours).
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17265 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04 14:39:22 +00:00
rizzo
217ea2f1ea
Largely simplify format handlers (for file copy etc.)
...
collecting common functions in a single place and removing
them from the individual handlers.
The full description is on mantis,
http://bugs.digium.com/view.php?id=6375
and only the ogg_vorbis handler needs to be converted to
the new structure.
As a result of this change, format_au.c and format_pcm_alaw.c
should go away (in a separate commit) as their functionality
(trivial) has been merged in another file.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17243 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04 12:59:25 +00:00