asterisk/asterisk.git
17 years agoconstify get_sdp*() and friends.
Luigi Rizzo [Mon, 10 Apr 2006 11:19:14 +0000 (11:19 +0000)]
constify get_sdp*() and friends.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18790 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoconstify get_header(), which let me find out and fix one bug (overwriting
Luigi Rizzo [Mon, 10 Apr 2006 11:04:04 +0000 (11:04 +0000)]
constify get_header(), which let me find out and fix one bug (overwriting
a string in the buffer) and finding out another one (not fixed yet,
just marked XXX).

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18789 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago- describe how sip packets are stored internally;
Luigi Rizzo [Mon, 10 Apr 2006 10:40:13 +0000 (10:40 +0000)]
- describe how sip packets are stored internally;
- remove useless braces or local variables;
- simplify some code sequences;
- mark with XXX a possible locking issue.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18788 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agostruct sip_request cleanup:
Luigi Rizzo [Mon, 10 Apr 2006 10:30:38 +0000 (10:30 +0000)]
struct sip_request cleanup:
- remove a debug field that was read but never set, so it was basically
  unused as well as the code testing it (also removed);

- make scalar fields contiguous so any array overflow will be
  less harmful;

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18787 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agomore cleanup: remove useless braces, replace "if" with "?",
Luigi Rizzo [Mon, 10 Apr 2006 10:22:42 +0000 (10:22 +0000)]
more cleanup: remove useless braces, replace "if" with "?",
localize a couple of variables, remove trailing whitespace.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18786 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoRe-instate removed comment
Olle Johansson [Mon, 10 Apr 2006 10:01:14 +0000 (10:01 +0000)]
Re-instate removed comment

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18785 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoanother batch of minor code simplifications
Luigi Rizzo [Mon, 10 Apr 2006 09:53:22 +0000 (09:53 +0000)]
another batch of minor code simplifications
(moving repeated expressions into a function, const on
some arguments)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18784 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoBug 6829 - asprintf for Solaris
Tilghman Lesher [Mon, 10 Apr 2006 07:48:52 +0000 (07:48 +0000)]
Bug 6829 - asprintf for Solaris

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18755 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoremove a couple more unnecessary "out of memory" error messages
Russell Bryant [Mon, 10 Apr 2006 02:19:58 +0000 (02:19 +0000)]
remove a couple more unnecessary "out of memory" error messages

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18723 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agouse ast_*alloc and don't create duplicated error messages.
Russell Bryant [Mon, 10 Apr 2006 02:15:47 +0000 (02:15 +0000)]
use ast_*alloc and don't create duplicated error messages.

... as stated in the coding guidelines.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18722 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoInstead of using strncpy, use ast_copy_string. Also, in the case of copying a
Russell Bryant [Mon, 10 Apr 2006 02:05:59 +0000 (02:05 +0000)]
Instead of using strncpy, use ast_copy_string.  Also, in the case of copying a
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

17 years agorun the module through indent to fix the formatting issues that violate the
Russell Bryant [Mon, 10 Apr 2006 02:01:39 +0000 (02:01 +0000)]
run the module through indent to fix the formatting issues that violate the
coding guidelines

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18704 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agofix typo in the provided indent command
Russell Bryant [Mon, 10 Apr 2006 01:54:13 +0000 (01:54 +0000)]
fix typo in the provided indent command

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18694 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoadd back braces that were removed in a recent commit that leave a bunch of
Russell Bryant [Mon, 10 Apr 2006 01:51:47 +0000 (01:51 +0000)]
add back braces that were removed in a recent commit that leave a bunch of
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

17 years agoa bunch of trivial code normalizations (removal of unnecessary
Luigi Rizzo [Sun, 9 Apr 2006 23:16:29 +0000 (23:16 +0000)]
a bunch of trivial code normalizations (removal of unnecessary
casts and parentheses, formatting fixes, pointing out replicated
code and so on). No functional changes.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18666 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agorename FR_SET_BUF to AST_FRAME_SET_BUFFER
Luigi Rizzo [Sun, 9 Apr 2006 22:31:38 +0000 (22:31 +0000)]
rename FR_SET_BUF to AST_FRAME_SET_BUFFER

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18639 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoIssue 6917 - some cleanups for res_config_pgsql.c (mithraen)
Olle Johansson [Sun, 9 Apr 2006 18:57:25 +0000 (18:57 +0000)]
Issue 6917 - some cleanups for res_config_pgsql.c (mithraen)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18607 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoIssue 6919 - clarify error message
Olle Johansson [Sun, 9 Apr 2006 18:53:46 +0000 (18:53 +0000)]
Issue 6919 - clarify error message

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18603 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoupdate module license key text and update loader to accept it
Kevin P. Fleming [Sat, 8 Apr 2006 22:37:30 +0000 (22:37 +0000)]
update module license key text and update loader to accept it

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18574 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoa few cleanups from the last commit
Kevin P. Fleming [Sat, 8 Apr 2006 22:16:34 +0000 (22:16 +0000)]
a few cleanups from the last commit

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18572 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agosince the module API is changing, it's a good time to const-ify the description(...
Kevin P. Fleming [Sat, 8 Apr 2006 22:01:19 +0000 (22:01 +0000)]
since the module API is changing, it's a good time to const-ify the description() and key() return values

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18552 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agomerge rizzo's codec module rework (very similar to the format module rework)
Kevin P. Fleming [Sat, 8 Apr 2006 21:40:57 +0000 (21:40 +0000)]
merge rizzo's codec module rework (very similar to the format module rework)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18541 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoMerged revisions 18494 via svnmerge from
Tilghman Lesher [Sat, 8 Apr 2006 19:22:29 +0000 (19:22 +0000)]
Merged revisions 18494 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r18494 | tilghman | 2006-04-08 14:20:45 -0500 (Sat, 08 Apr 2006) | 2 lines

Bug 6914 - .txt file fails to rename on operator out

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18495 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agofix bug in smdi config parsing (issue #6908)
Russell Bryant [Sat, 8 Apr 2006 19:16:38 +0000 (19:16 +0000)]
fix bug in smdi config parsing (issue #6908)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18493 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoremove traces of "look", something that does not exist in the tree
Russell Bryant [Sat, 8 Apr 2006 19:13:37 +0000 (19:13 +0000)]
remove traces of "look", something that does not exist in the tree
(issue #6904)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18492 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoMerged revisions 18436 via svnmerge from
Tilghman Lesher [Fri, 7 Apr 2006 22:11:12 +0000 (22:11 +0000)]
Merged revisions 18436 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r18436 | tilghman | 2006-04-07 17:07:38 -0500 (Fri, 07 Apr 2006) | 2 lines

Bug 6913 - fix for possible buffer overflow

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18437 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago-Fixing some debugging messages in history and console
Olle Johansson [Fri, 7 Apr 2006 20:19:44 +0000 (20:19 +0000)]
-Fixing some debugging messages in history and console

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18403 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAdd history events for re-invites
Olle Johansson [Fri, 7 Apr 2006 19:46:50 +0000 (19:46 +0000)]
Add history events for re-invites
(need to nail this issue...)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18373 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agomake history easier to read
Olle Johansson [Fri, 7 Apr 2006 19:36:44 +0000 (19:36 +0000)]
make history easier to read

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18371 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAdd some more information to SIP history
Olle Johansson [Fri, 7 Apr 2006 19:25:19 +0000 (19:25 +0000)]
Add some more information to SIP history

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18370 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoIssue #6899 - remove OSP support code from chan_sip.c and app_dial.c
Olle Johansson [Fri, 7 Apr 2006 19:11:22 +0000 (19:11 +0000)]
Issue #6899 - remove OSP support code from chan_sip.c and app_dial.c
- 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

17 years agoHmm. What is that keyword?? Let me see... Wait... Maybe... Ahh! OOPS!
Olle Johansson [Fri, 7 Apr 2006 18:52:23 +0000 (18:52 +0000)]
Hmm. What is that keyword?? Let me see... Wait... Maybe... Ahh! OOPS!

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18342 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agochange a couple uses of !strlen() to ast_strlen_zero(). Oddly enough, one of
Russell Bryant [Fri, 7 Apr 2006 16:28:50 +0000 (16:28 +0000)]
change a couple uses of !strlen() to ast_strlen_zero().  Oddly enough, one of
these used to be this way and got changed ...

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18309 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago- sip_alloc failures are also caused by too few available file descriptors, so we...
Olle Johansson [Fri, 7 Apr 2006 16:22:28 +0000 (16:22 +0000)]
- sip_alloc failures are also caused by too few available file descriptors, so we can not
  open socket for RTP (audio/video/rtcp).
  Error message change to clarify.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18307 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago- Add cause code for format error
Olle Johansson [Fri, 7 Apr 2006 14:42:25 +0000 (14:42 +0000)]
- Add cause code for format error
- Change to SWITCH_CONGESTION instead of CONGESTION
(imported from 1.2)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18262 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoImport of revistion 18250 from 1.2
Olle Johansson [Fri, 7 Apr 2006 14:30:14 +0000 (14:30 +0000)]
Import of revistion 18250 from 1.2
- Fix minor memory leak
- Add proper cause codes on memory allocation failures

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18261 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agosorry litle mistake
Christian Richter [Fri, 7 Apr 2006 12:03:51 +0000 (12:03 +0000)]
sorry litle mistake

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18221 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agogit-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18192 65c4cc65-6c06-0410...
Christian Richter [Fri, 7 Apr 2006 09:46:38 +0000 (09:46 +0000)]
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18192 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agofixed a bridging-endless-loop also fixed the rdnis is not exported issue
Christian Richter [Fri, 7 Apr 2006 09:31:27 +0000 (09:31 +0000)]
fixed a bridging-endless-loop also fixed the rdnis is not exported issue

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18190 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoIssue #6674: Set the URI correctly on BYEs when we have an incoming call
Olle Johansson [Fri, 7 Apr 2006 08:19:52 +0000 (08:19 +0000)]
Issue #6674: Set the URI correctly on BYEs when we have an incoming call
Reported by aubergine, fix by oej

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18161 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoIssue #6580 - Unify directory definitions to one section of Makefile (casper)
Olle Johansson [Fri, 7 Apr 2006 07:04:05 +0000 (07:04 +0000)]
Issue #6580 - Unify directory definitions to one section of Makefile (casper)
- Maybe we should define proper directories for OS/X too?
- Should OpenBSD and NetBSD follow the FreeBSD rules?

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18130 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoMerged revisions 18087 via svnmerge from
Kevin P. Fleming [Thu, 6 Apr 2006 22:16:23 +0000 (22:16 +0000)]
Merged revisions 18087 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r18087 | kpfleming | 2006-04-06 17:04:58 -0500 (Thu, 06 Apr 2006) | 3 lines

don't try to support 'i' or 'r' options if chan_zap is not loaded, and warn the user when they attempt to use them (issue #6675)
update application help text to more clearly define when Zaptel and chan_zap are required

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18090 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoCosmetic update for outbound REFERs
Olle Johansson [Thu, 6 Apr 2006 21:49:24 +0000 (21:49 +0000)]
Cosmetic update for outbound REFERs

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18060 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAdd "NewChan" event to history to track the birth of a new ast_chan from a
Olle Johansson [Thu, 6 Apr 2006 21:33:39 +0000 (21:33 +0000)]
Add "NewChan" event to history to track the birth of a new ast_chan from a
SIP invite

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18059 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoImproved handling of 491 responses
Olle Johansson [Thu, 6 Apr 2006 21:29:54 +0000 (21:29 +0000)]
Improved handling of 491 responses

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18058 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoSmall changes to parse_sip_options
Olle Johansson [Thu, 6 Apr 2006 21:18:12 +0000 (21:18 +0000)]
Small changes to parse_sip_options

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18057 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoSmall fixes to handle_request_invite
Olle Johansson [Thu, 6 Apr 2006 21:13:32 +0000 (21:13 +0000)]
Small fixes to handle_request_invite

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18056 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago- Don't change channel direction on re-invites
Olle Johansson [Thu, 6 Apr 2006 21:01:06 +0000 (21:01 +0000)]
- Don't change channel direction on re-invites
- Don't re-initialize initreq on re-invites

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18033 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago More code optimizations. Thanks kpfleming!
BJ Weschke [Thu, 6 Apr 2006 20:37:29 +0000 (20:37 +0000)]
 More code optimizations. Thanks kpfleming!

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18025 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago- Implement handle_request_notify to handle incoming NOTIFY requests
Olle Johansson [Thu, 6 Apr 2006 20:36:25 +0000 (20:36 +0000)]
- Implement handle_request_notify to handle incoming NOTIFY requests
  and respond properly to them.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18024 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago Fix a problem where if the channel was hungup during detection, the application...
BJ Weschke [Thu, 6 Apr 2006 20:23:18 +0000 (20:23 +0000)]
 Fix a problem where if the channel was hungup during detection, the application wouldn't block indefinitely looking for another frame from that channel. Don't try to do frame size analysis on a frame that isn't voice, only report DEBUG and VERBOSE msgs to the logger channels when the DEBUG and VERBOSE settings are high enough to require it, and some other minor cleanups.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18023 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoImplement a handle_response_refer function to take care of responses
Olle Johansson [Thu, 6 Apr 2006 20:16:08 +0000 (20:16 +0000)]
Implement a handle_response_refer function to take care of responses
to outbound REFERS. Not that common, but still needed.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18022 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoChange transmit_notify_sipfrag to handle other messages than 200 OK, needed for
Olle Johansson [Thu, 6 Apr 2006 19:59:21 +0000 (19:59 +0000)]
Change transmit_notify_sipfrag to handle other messages than 200 OK, needed for
SIPtransfer improvement

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17993 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago- doxygen
Olle Johansson [Thu, 6 Apr 2006 19:39:27 +0000 (19:39 +0000)]
- doxygen
- debug message control

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17991 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agostructures can be copied with the '=' operators, no need to
Luigi Rizzo [Thu, 6 Apr 2006 19:31:59 +0000 (19:31 +0000)]
structures can be copied with the '=' operators, no need to
use memcpy.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17988 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agogit-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17946 65c4cc65-6c06-0410...
Russell Bryant [Thu, 6 Apr 2006 17:25:34 +0000 (17:25 +0000)]
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17946 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agovarious cleanups to the Makefile
Russell Bryant [Thu, 6 Apr 2006 17:13:00 +0000 (17:13 +0000)]
various cleanups to the Makefile
- remove unused OSREV varibale
- move various CROSS_COMPILE variables to the top and group them together
- move various PROC definitions to the top as a group
- remove usused MARCH variable
(issue #6892)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17944 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agonormalize some for() loops.
Luigi Rizzo [Thu, 6 Apr 2006 17:09:00 +0000 (17:09 +0000)]
normalize some for() loops.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17943 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoMerged revisions 17905 via svnmerge from
Joshua Colp [Thu, 6 Apr 2006 17:01:47 +0000 (17:01 +0000)]
Merged revisions 17905 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r17905 | file | 2006-04-06 14:00:10 -0300 (Thu, 06 Apr 2006) | 2 lines

Update email address to my Digium one

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17914 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoskinny debug/verbose cleanup.
North Antara [Thu, 6 Apr 2006 16:50:33 +0000 (16:50 +0000)]
skinny debug/verbose cleanup.

Thanks casper!

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17903 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agominor formatting changes again
Luigi Rizzo [Thu, 6 Apr 2006 16:44:31 +0000 (16:44 +0000)]
minor formatting changes again

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17902 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agonormalize repeated instances of code as follows:
Luigi Rizzo [Thu, 6 Apr 2006 16:17:04 +0000 (16:17 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@17899 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agooptimize move_variables() so that two lists can be created
Luigi Rizzo [Thu, 6 Apr 2006 16:06:57 +0000 (16:06 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@17898 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago+ create function cdr_get_tv to replace several duplicated
Luigi Rizzo [Thu, 6 Apr 2006 16:01:56 +0000 (16:01 +0000)]
+ 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

17 years agominor code cleanup
Luigi Rizzo [Thu, 6 Apr 2006 15:55:15 +0000 (15:55 +0000)]
minor code cleanup

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17867 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoconvert one more file...
Luigi Rizzo [Thu, 6 Apr 2006 15:48:06 +0000 (15:48 +0000)]
convert one more file...

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17866 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoremove traces of previously merged files
Luigi Rizzo [Thu, 6 Apr 2006 15:43:06 +0000 (15:43 +0000)]
remove traces of previously merged files

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17865 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFormatting fixes
Olle Johansson [Thu, 6 Apr 2006 15:41:37 +0000 (15:41 +0000)]
Formatting fixes

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17864 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agominor formatting cleanup and removal of trailing whitespace.
Luigi Rizzo [Thu, 6 Apr 2006 15:40:12 +0000 (15:40 +0000)]
minor formatting cleanup and removal of trailing whitespace.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17863 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFormatting fixes
Olle Johansson [Thu, 6 Apr 2006 15:25:56 +0000 (15:25 +0000)]
Formatting fixes

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17862 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFormatting fixes
Olle Johansson [Thu, 6 Apr 2006 15:23:14 +0000 (15:23 +0000)]
Formatting fixes

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17861 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agouse the new module interface for this module, but make it
Luigi Rizzo [Thu, 6 Apr 2006 15:10:29 +0000 (15:10 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@17860 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agomake sure that file calls other than OPEN work on all formats
Luigi Rizzo [Thu, 6 Apr 2006 15:08:31 +0000 (15:08 +0000)]
make sure that file calls other than OPEN work on all formats
if called with a NULL 'fmt' argument.
(SVN 6898)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17859 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoMake "show http" CLI command follow new guidelines - now "http show status"
Olle Johansson [Thu, 6 Apr 2006 14:43:06 +0000 (14:43 +0000)]
Make "show http" CLI command follow new guidelines - now "http show status"

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17828 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agowhitespace and formatting fix postponed from last commit:
Luigi Rizzo [Thu, 6 Apr 2006 14:40:47 +0000 (14:40 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@17827 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agosplit pbx_load_module so we can reduce the indentation depth.
Luigi Rizzo [Thu, 6 Apr 2006 14:23:37 +0000 (14:23 +0000)]
split pbx_load_module so we can reduce the indentation depth.
Also convert to MOD_1 style.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17825 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agouse FREE instead of free as pointer to the destructor function.
Luigi Rizzo [Thu, 6 Apr 2006 14:02:19 +0000 (14:02 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@17824 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoconvert a couple of applications to the new module style
Luigi Rizzo [Thu, 6 Apr 2006 09:24:02 +0000 (09:24 +0000)]
convert a couple of applications to the new module style
(STATIC_MODULE) to show what needs to be changed.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17791 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agosmall cleanups to module.h and loader.c to start playing with
Luigi Rizzo [Thu, 6 Apr 2006 09:10:31 +0000 (09:10 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@17790 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agothe fix for bug #6399 makes sense. thanks wrmem for the report.
Luigi Rizzo [Thu, 6 Apr 2006 08:02:35 +0000 (08:02 +0000)]
the fix for bug #6399 makes sense. thanks wrmem for the report.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17753 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoIssue #6893 - Compiler warnings for PostgreSQL ARA driver
Olle Johansson [Thu, 6 Apr 2006 06:55:38 +0000 (06:55 +0000)]
Issue #6893 - Compiler warnings for PostgreSQL ARA driver

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17740 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoIssue #6610 - build on Intel Mac
Olle Johansson [Wed, 5 Apr 2006 20:14:51 +0000 (20:14 +0000)]
Issue #6610 - build on Intel Mac
(Wish I could try this at home :-)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17735 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoMerged revisions 17702 via svnmerge from
Joshua Colp [Wed, 5 Apr 2006 20:05:09 +0000 (20:05 +0000)]
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: https://origsvn.digium.com/svn/asterisk/trunk@17726 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago- Doxygen fixes
Olle Johansson [Wed, 5 Apr 2006 19:32:40 +0000 (19:32 +0000)]
- Doxygen fixes
- Typos corrected

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17694 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoUnbreak res/Makefile (issue #6891 as reported by casper)
Joshua Colp [Wed, 5 Apr 2006 18:37:29 +0000 (18:37 +0000)]
Unbreak res/Makefile (issue #6891 as reported by casper)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17661 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoIssue #5637 - Realtime driver for PostgreSQL (mguesdon)
Olle Johansson [Wed, 5 Apr 2006 17:46:09 +0000 (17:46 +0000)]
Issue #5637 - Realtime driver for PostgreSQL (mguesdon)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17628 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoBug 6873 - Finish moving from the non-threadsafe (and poor randomness) rand() to...
Tilghman Lesher [Wed, 5 Apr 2006 17:44:44 +0000 (17:44 +0000)]
Bug 6873 - Finish moving from the non-threadsafe (and poor randomness) rand() to threadsafe ast_random()

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17627 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoBug 6508 - if priority was a number, then findlabel fails
Tilghman Lesher [Wed, 5 Apr 2006 17:03:30 +0000 (17:03 +0000)]
Bug 6508 - if priority was a number, then findlabel fails

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17626 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agosome final fixes for cpn
Christian Richter [Wed, 5 Apr 2006 15:54:15 +0000 (15:54 +0000)]
some final fixes for cpn

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17594 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago* advanced the error Handling routine for wrong frames from mISDN
Christian Richter [Wed, 5 Apr 2006 14:51:48 +0000 (14:51 +0000)]
* 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: https://origsvn.digium.com/svn/asterisk/trunk@17562 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAdd some documentation and a todo for enum.c
Olle Johansson [Wed, 5 Apr 2006 13:53:06 +0000 (13:53 +0000)]
Add some documentation and a todo for enum.c

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17530 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoIssue #6654: Enum crash on ADDRESS record, possibly bad record, but still a crash...
Olle Johansson [Wed, 5 Apr 2006 06:52:41 +0000 (06:52 +0000)]
Issue #6654: Enum crash on ADDRESS record, possibly bad record, but still a crash (imported from 1.2)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17490 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAdd reference pointers to RFCs
Olle Johansson [Wed, 5 Apr 2006 06:43:14 +0000 (06:43 +0000)]
Add reference pointers to RFCs

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17488 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoBug 6886 - Add application TryExec, which does mostly the same thing, but returns...
Tilghman Lesher [Wed, 5 Apr 2006 03:53:41 +0000 (03:53 +0000)]
Bug 6886 - Add application TryExec, which does mostly the same thing, but returns differently

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17454 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix formatting
Olle Johansson [Tue, 4 Apr 2006 19:48:42 +0000 (19:48 +0000)]
Fix formatting

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17415 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago fixed some essential segfaults happening under heavy load. Added a bit more error...
Christian Richter [Tue, 4 Apr 2006 19:09:26 +0000 (19:09 +0000)]
 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: https://origsvn.digium.com/svn/asterisk/trunk@17404 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoIssue #6884 - manager.c formatting (casper)
Olle Johansson [Tue, 4 Apr 2006 19:03:12 +0000 (19:03 +0000)]
Issue #6884 - manager.c formatting (casper)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17389 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFormatting cleanup
Olle Johansson [Tue, 4 Apr 2006 18:34:21 +0000 (18:34 +0000)]
Formatting cleanup

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17369 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoBlock 17367 from trunk, since it's already fixed (me bad)
Olle Johansson [Tue, 4 Apr 2006 18:30:31 +0000 (18:30 +0000)]
Block 17367 from trunk, since it's already fixed (me bad)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17368 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoIssue #6878 - Manager event DNDstate hidden under verbose option (casper)
Olle Johansson [Tue, 4 Apr 2006 18:26:24 +0000 (18:26 +0000)]
Issue #6878 - Manager event DNDstate hidden under verbose option (casper)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17366 65c4cc65-6c06-0410-ace0-fbb531ad65f3