[Home]

Summary:ASTERISK-06394: [patch] _ast_request_and_dial() fails if the channel is immediately UP
Reporter:Tony Mountifield (softins)Labels:
Date Opened:2006-02-22 02:41:45.000-0600Date Closed:2008-01-15 17:03:46.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) channel.c.diff
Description:In __ast_request_and_dial() (channel.c), if the channel already has state AST_STATE_UP by the time ast_call() returns, the while loop is never executed, and the value of res remains at zero. This causes the channel to be immediately hung up when control reaches the test "if (chan && res <= 0)".

The attached trivial patch corrects this by assigning a positive value to res just before entering the while loop.

The patch is against the 1.2 branch, but is easily applied by hand to the trunk.
Comments:By: Russell Bryant (russell) 2006-02-26 19:51:47.000-0600

added to the 1.2 branch and trunk in revisions 11250 and 11251, thanks!

By: Digium Subversion (svnbot) 2008-01-15 17:03:45.000-0600

Repository: asterisk
Revision: 11250

U   branches/1.2/channel.c

------------------------------------------------------------------------
r11250 | russell | 2008-01-15 17:03:45 -0600 (Tue, 15 Jan 2008) | 2 lines

don't hang up the channel if its state is set to UP before we return from ast_call (issue ASTERISK-6394)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=11250

By: Digium Subversion (svnbot) 2008-01-15 17:03:46.000-0600

Repository: asterisk
Revision: 11251

_U  trunk/
U   trunk/channel.c

------------------------------------------------------------------------
r11251 | russell | 2008-01-15 17:03:45 -0600 (Tue, 15 Jan 2008) | 10 lines

Merged revisions 11250 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r11250 | russell | 2006-02-26 21:50:09 -0500 (Sun, 26 Feb 2006) | 2 lines

don't hang up the channel if its state is set to UP before we return from ast_call (issue ASTERISK-6394)

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=11251