Remove unnecessary code in ast_read as issue 16058 has been fully solved now.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@243258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jeff Peeler
2010-01-26 18:19:10 +00:00
parent 82b871e683
commit b024a9452d

View File

@@ -2531,19 +2531,6 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
ast_frame_dump(chan->name, f, "<<");
chan->fin = FRAMECOUNT_INC(chan->fin);
if (f && f->frametype == AST_FRAME_CONTROL && f->subclass == AST_CONTROL_HOLD && f->datalen == 0 && f->data) {
/* fix invalid pointer */
f->data = NULL;
#ifdef AST_DEVMODE
ast_log(LOG_ERROR, "Found HOLD frame with src '%s' on channel '%s' with datalen zero, but non-null data pointer!\n", f->src, chan->name);
ast_frame_dump(chan->name, f, "<<");
#else
if (option_debug > 2) {
ast_log(LOG_DEBUG, "Found HOLD frame with src '%s' on channel '%s' with datalen zero, but non-null data pointer!\n", f->src, chan->name);
}
#endif
}
done:
ast_channel_unlock(chan);
return f;