Avoid a crash in the handling of DTMF based Caller ID. It is valid for

ast_read to return NULL in the case that the channel has been hung up.
(crash reported by anonymouz666 on IRC in #asterisk-dev)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2007-08-17 21:01:43 +00:00
parent 403ee9194c
commit 467ceebc82
+2
View File
@@ -6111,6 +6111,8 @@ static void *ss_thread(void *data)
return NULL;
}
f = ast_read(chan);
if (!f)
break;
if (f->frametype == AST_FRAME_DTMF) {
dtmfbuf[i++] = f->subclass;
ast_log(LOG_DEBUG, "CID got digit '%c'\n", f->subclass);