diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index b15caa5bef7a607e07491bd29f605636be71b150..a394ec89c4fce8e368907524461766fa7045ef4e 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -11841,6 +11841,7 @@ static struct dahdi_pvt *handle_init_event(struct dahdi_pvt *i, int event) 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); } } ast_callid_threadstorage_auto_clean(callid, callid_created); @@ -12111,6 +12112,7 @@ static void *do_monitor(void *data) 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; } diff --git a/channels/sig_analog.c b/channels/sig_analog.c index eef0436769d2750f0b4eba3eb1ff9dae49266547..f40932f2787311782e7870471403f867ed3be636 100644 --- a/channels/sig_analog.c +++ b/channels/sig_analog.c @@ -3886,6 +3886,7 @@ void *analog_handle_init_event(struct analog_pvt *i, int event) 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); } } ast_callid_threadstorage_auto_clean(callid, callid_created); @@ -3912,6 +3913,7 @@ void *analog_handle_init_event(struct analog_pvt *i, int event) 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); } } ast_callid_threadstorage_auto_clean(callid, callid_created);