From: Tilghman Lesher Date: Thu, 19 Jun 2008 22:53:22 +0000 (+0000) Subject: It's possible for a hangup to be received, even just after the initial cid X-Git-Tag: 1.4.22-rc1~192 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=db334a1edc1f1f04bb3a2ac6e590b8496ecf27f9;p=thirdparty%2Fasterisk.git It's possible for a hangup to be received, even just after the initial cid spill. (closes issue #12453) Reported by: Alex728 Patches: 20080604__bug12453.diff.txt uploaded by Corydon76 (license 14) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@124182 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index c03981dd58..49f9d3e711 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -6252,7 +6252,11 @@ static void *ss_thread(void *data) ast_hangup(chan); return NULL; } - f = ast_read(chan); + if (!(f = ast_read(chan))) { + ast_log(LOG_WARNING, "Hangup received waiting for ring. Exiting simple switch\n"); + ast_hangup(chan); + return NULL; + } ast_frfree(f); if (chan->_state == AST_STATE_RING || chan->_state == AST_STATE_RINGING)