asterisk/main
Steve Murphy 6fad66dfb3 Merged revisions 152535 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r152535 | murf | 2008-10-28 22:36:32 -0600 (Tue, 28 Oct 2008) | 46 lines

The magic trick to avoid this crash is not to
try to find the channel by name in the list,
which is slow and resource consuming, but rather
to pay attention to the result codes from the
ast_bridge_call, to which I added the 
AST_PBX_NO_HANGUP_PEER_PARKED value, which
now are returned when a channel is parked.
Why? because CDR's aren't generated via parking,
so nothing is needed, but if a transfer occurred,
there are critical things I need.

If you get AST_PBX_KEEPALIVE,
then don't touch the channel pointer.

If you get AST_PBX_NO_HANGUP_PEER, or
AST_PBX_NO_HANGUP_PEER_PARKED, then don't
touch the peer pointer.

Updated the several places where the results
from a bridge were not being properly obeyed,
and fixed some code I had introduced so that
the results of the bridge were not overridden 
(in trunk).

All the places that previously tested for 
AST_PBX_NO_HANGUP_PEER now have to check for
both AST_PBX_NO_HANGUP_PEER and AST_PBX_NO_HANGUP_PEER_PARKED.

I tested this against the 4 common parking
scenarios:


1. A calls B; B answers; A parks B; B hangs up while A is getting the parking
slot announcement, immediately after being put on hold.

2. A calls B; B answers; A parks B; B hangs up after A has been hung up, but
before the park times out.

3. A calls B; B answers; B parks A; A hangs up while B is getting the parking slot announcement, immediately after being put on hold.

4. A calls B; B answers; B parks A; A hangs up after B has been hung up, but before the park times out.


No crash.

I also ran the scenarios above against valgrind, and accesses looked good.



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-29 05:01:00 +00:00
..
db1-ast Another big chunk of changes from the RSW branch. Bunch of stuff from main/ 2008-08-10 19:35:50 +00:00
editline Merged revisions 129343 via svnmerge from 2008-07-09 13:44:43 +00:00
stdtime Add schedule extensions to app_meetme. In addition, the reporter found a 2008-10-01 23:02:25 +00:00
Makefile Merged revisions 144924-144925 via svnmerge from 2008-09-27 15:52:56 +00:00
abstract_jb.c Another big chunk of changes from the RSW branch. Bunch of stuff from main/ 2008-08-10 19:35:50 +00:00
acl.c Another big chunk of changes from the RSW branch. Bunch of stuff from main/ 2008-08-10 19:35:50 +00:00
adsistub.c remove a bunch of useless #include "options.h" 2007-11-21 23:09:02 +00:00
aescrypt.c use the OpenSSL AES implementation if it's available (unless configured not to) 2007-05-24 22:07:50 +00:00
aeskey.c use the OpenSSL AES implementation if it's available (unless configured not to) 2007-05-24 22:07:50 +00:00
aesopt.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
aestab.c use the OpenSSL AES implementation if it's available (unless configured not to) 2007-05-24 22:07:50 +00:00
alaw.c Whitespace changes only 2008-03-04 23:04:29 +00:00
app.c When checking for an encoded character, make sure the string isn't blank, first. 2008-09-12 16:54:44 +00:00
ast_expr2.c Merged revisions 144924-144925 via svnmerge from 2008-09-27 15:52:56 +00:00
ast_expr2.fl Merged revisions 144924-144925 via svnmerge from 2008-09-27 15:52:56 +00:00
ast_expr2.h (closes issue #12467) 2008-04-21 21:13:02 +00:00
ast_expr2.y Merged revisions 144924-144925 via svnmerge from 2008-09-27 15:52:56 +00:00
ast_expr2f.c Merged revisions 144924-144925 via svnmerge from 2008-09-27 15:52:56 +00:00
asterisk.c Merged revisions 151905 via svnmerge from 2008-10-25 11:02:11 +00:00
astmm.c Merged revisions 144924-144925 via svnmerge from 2008-09-27 15:52:56 +00:00
astobj2.c (closes issue #13557) 2008-10-09 14:17:33 +00:00
audiohook.c Merged revisions 149204 via svnmerge from 2008-10-14 23:04:44 +00:00
autoservice.c Merged revisions 138027 via svnmerge from 2008-08-15 15:09:46 +00:00
buildinfo.c merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
callerid.c Cleaned up comment 2008-09-09 17:30:52 +00:00
cdr.c Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating 2008-09-12 23:30:03 +00:00
channel.c Modify ast_answer() to not hold the channel lock while calling ast_safe_sleep() 2008-09-09 01:47:56 +00:00
chanvars.c Add additional memory debugging to several core APIs, and fix several memory 2008-10-14 22:38:06 +00:00
cli.c Fix CLI command 'channel request hangup' 2008-10-17 17:31:07 +00:00
config.c Do NOT attempt to do anything with the ast_config struct when it's been returned as INVALID by the config file interpreter. 2008-10-20 05:07:25 +00:00
cryptostub.c Don't include logger.h in asterisk.h by default as it is causing problems building 2008-10-10 00:42:13 +00:00
cygload.c Doxygen updates, formatting. 2007-12-11 22:20:22 +00:00
datastore.c make datastore creation and destruction a generic API since it is not really channel related, and add the ability to add/find/remove datastores to manager sessions 2008-08-05 16:56:11 +00:00
db.c Several manager changes: 2008-01-10 00:12:35 +00:00
devicestate.c actually use the cache_cache argument 2008-07-26 15:16:20 +00:00
dial.c The dialing API should inherit datastores as well as variables 2008-10-03 17:35:37 +00:00
dns.c Fix a bug in SRV lookups where dnsmgr would discard everything but the 2008-07-08 21:00:01 +00:00
dnsmgr.c Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating 2008-09-12 23:30:03 +00:00
dsp.c Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating 2008-09-12 23:30:03 +00:00
ecdisa.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
enum.c Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating 2008-09-12 23:30:03 +00:00
event.c Another big chunk of changes from the RSW branch. Bunch of stuff from main/ 2008-08-10 19:35:50 +00:00
features.c Merged revisions 152535 via svnmerge from 2008-10-29 05:01:00 +00:00
file.c Reverting format addition for now 2008-10-09 21:47:02 +00:00
fixedjitterbuf.c Start untangling header inclusion in a way that does not affect 2007-11-16 20:04:58 +00:00
fixedjitterbuf.h Merged revisions 135841,135847,135850 via svnmerge from 2008-08-06 00:30:53 +00:00
frame.c Another batch of files from RSW. The remaining apps and a few more 2008-08-10 20:23:50 +00:00
fskmodem.c (Step 2 of 2) 2008-07-21 21:00:47 +00:00
fskmodem_float.c Optionally build integer-based routines for FSK tone decoding (but default 2008-07-21 20:59:03 +00:00
fskmodem_int.c Optionally build integer-based routines for FSK tone decoding (but default 2008-07-21 20:59:03 +00:00
global_datastores.c Asterisk, when parking can drop rights a caller when a parking timeout occurs. Also, when doing built-in attended transfers, sometimes incorrectly passes rights from the transferrer to the transferee. This patch tries to fixes the parking issue and lays some groundwork for later fixing the transfer issue. 2008-03-01 01:30:37 +00:00
hashtab.c Add additional memory debugging to several core APIs, and fix several memory 2008-10-14 22:38:06 +00:00
http.c cleaup of the TCP/TLS socket API: 2008-10-19 19:11:28 +00:00
image.c Whitespace changes only 2008-03-04 23:04:29 +00:00
indications.c Another batch of files from RSW. The remaining apps and a few more 2008-08-10 20:23:50 +00:00
io.c Merged revisions 94977 via svnmerge from 2007-12-27 20:11:20 +00:00
jitterbuf.c Another big chunk of changes from the RSW branch. Bunch of stuff from main/ 2008-08-10 19:35:50 +00:00
loader.c Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating 2008-09-12 23:30:03 +00:00
logger.c Another batch of files from RSW. The remaining apps and a few more 2008-08-10 20:23:50 +00:00
manager.c cleaup of the TCP/TLS socket API: 2008-10-19 19:11:28 +00:00
md5.c Start untangling header inclusion in a way that does not affect 2007-11-16 20:04:58 +00:00
netsock.c Make OpenBSD compile again 2008-06-19 20:25:37 +00:00
pbx.c Hmmm. Nobody (but me) is interested in seeing 2008-10-13 17:14:38 +00:00
plc.c Start untangling header inclusion in a way that does not affect 2007-11-16 20:04:58 +00:00
poll.c Merged revisions 140816 via svnmerge from 2008-09-03 13:26:43 +00:00
privacy.c remove a bunch of useless #include "options.h" 2007-11-21 23:09:02 +00:00
rtp.c (closes issue #13557) 2008-10-09 14:17:33 +00:00
say.c That's all, folks. Not going to update the Makefile until res_jabber is 2008-08-10 20:57:25 +00:00
sched.c Merged revisions 142354 via svnmerge from 2008-09-10 16:41:55 +00:00
sha1.c more header removal/normalization 2007-11-21 00:23:49 +00:00
slinfactory.c - revert change to ast_queue_hangup and create ast_queue_hangup_with_cause 2008-05-22 16:29:54 +00:00
srv.c Fix a bug in SRV lookups where dnsmgr would discard everything but the 2008-07-08 21:00:01 +00:00
strcompat.c Whitespace changes only 2008-03-04 23:04:29 +00:00
taskprocessor.c Merge the cli_cleanup branch. 2008-09-28 23:32:14 +00:00
tcptls.c cleaup of the TCP/TLS socket API: 2008-10-19 19:11:28 +00:00
tdd.c Don't include logger.h in asterisk.h by default as it is causing problems building 2008-10-10 00:42:13 +00:00
term.c Allow people to select the old console behavior of white text on a black 2008-10-07 17:44:32 +00:00
threadstorage.c Janitor patch to change uses of sizeof to ARRAY_LEN 2008-07-11 18:09:35 +00:00
timing.c - add get_max_rate timing API call 2008-06-26 15:37:01 +00:00
translate.c Merged revisions 148611 via svnmerge from 2008-10-14 08:06:45 +00:00
udptl.c Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating 2008-09-12 23:30:03 +00:00
ulaw.c another bunch of include removals (errno.h and asterisk/logger.h) 2007-11-19 19:09:03 +00:00
utils.c Merged revisions 132872 via svnmerge from 2008-07-23 16:30:18 +00:00