[asterisk-commits] rmudgett: branch 10 r370025 - in /branches/10: ./ channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 12 15:20:07 CDT 2012


Author: rmudgett
Date: Thu Jul 12 15:20:02 2012
New Revision: 370025

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=370025
Log:
Add missing ast_hangup() calls on some analog exception paths.

Make starting analog_ss_thread() or __analog_ss_thread() failure paths
hangup the channel.
........

Merged revisions 370017 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/10/   (props changed)
    branches/10/channels/chan_dahdi.c
    branches/10/channels/sig_analog.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/channels/chan_dahdi.c?view=diff&rev=370025&r1=370024&r2=370025
==============================================================================
--- branches/10/channels/chan_dahdi.c (original)
+++ branches/10/channels/chan_dahdi.c Thu Jul 12 15:20:02 2012
@@ -11708,6 +11708,7 @@
 					ast_log(LOG_WARNING, "Cannot allocate new structure on channel %d\n", i->channel);
 				} else if (ast_pthread_create_detached(&threadid, NULL, analog_ss_thread, chan)) {
 					ast_log(LOG_WARNING, "Unable to start simple switch thread on channel %d\n", i->channel);
+					ast_hangup(chan);
 				}
 			}
 			break;
@@ -11975,6 +11976,7 @@
 											res = ast_pthread_create_detached(&threadid, NULL, analog_ss_thread, chan);
 											if (res) {
 												ast_log(LOG_WARNING, "Unable to start simple switch thread on channel %d\n", i->channel);
+												ast_hangup(chan);
 											} else {
 												i->dtmfcid_holdoff_state = 1;
 											}

Modified: branches/10/channels/sig_analog.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/channels/sig_analog.c?view=diff&rev=370025&r1=370024&r2=370025
==============================================================================
--- branches/10/channels/sig_analog.c (original)
+++ branches/10/channels/sig_analog.c Thu Jul 12 15:20:02 2012
@@ -3837,6 +3837,7 @@
 					ast_log(LOG_WARNING, "Cannot allocate new structure on channel %d\n", i->channel);
 				} else if (ast_pthread_create_detached(&threadid, NULL, __analog_ss_thread, i)) {
 					ast_log(LOG_WARNING, "Unable to start simple switch thread on channel %d\n", i->channel);
+					ast_hangup(chan);
 				}
 			}
 			break;
@@ -3861,6 +3862,7 @@
 					ast_log(LOG_WARNING, "Cannot allocate new structure on channel %d\n", i->channel);
 				} else if (ast_pthread_create_detached(&threadid, NULL, __analog_ss_thread, i)) {
 					ast_log(LOG_WARNING, "Unable to start simple switch thread on channel %d\n", i->channel);
+					ast_hangup(chan);
 				}
 			}
 			break;




More information about the asterisk-commits mailing list