[asterisk-commits] rmudgett: branch 1.8 r370017 - /branches/1.8/channels/

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


Author: rmudgett
Date: Thu Jul 12 15:15:42 2012
New Revision: 370017

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=370017
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.

Modified:
    branches/1.8/channels/chan_dahdi.c
    branches/1.8/channels/sig_analog.c

Modified: branches/1.8/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_dahdi.c?view=diff&rev=370017&r1=370016&r2=370017
==============================================================================
--- branches/1.8/channels/chan_dahdi.c (original)
+++ branches/1.8/channels/chan_dahdi.c Thu Jul 12 15:15:42 2012
@@ -11621,6 +11621,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;
@@ -11888,6 +11889,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/1.8/channels/sig_analog.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/sig_analog.c?view=diff&rev=370017&r1=370016&r2=370017
==============================================================================
--- branches/1.8/channels/sig_analog.c (original)
+++ branches/1.8/channels/sig_analog.c Thu Jul 12 15:15:42 2012
@@ -3831,6 +3831,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;
@@ -3855,6 +3856,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