]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 233100 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Fri, 4 Dec 2009 17:22:34 +0000 (17:22 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 4 Dec 2009 17:22:34 +0000 (17:22 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r233100 | russell | 2009-12-04 11:18:22 -0600 (Fri, 04 Dec 2009) | 14 lines

  Merged revisions 233092 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r233092 | russell | 2009-12-04 11:12:47 -0600 (Fri, 04 Dec 2009) | 7 lines

    Only do frame payload check for HOLD frames.

    This code was added for helping to debug the source of invalid HOLD frames.
    However, a side effect of this is that it will incorrectly report errors for
    frames that have an integer payload.  Make the check for this block specific
    to the HOLD frame case.
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@233122 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/channel.c

index 9f0ae7abebba41578d80d668e03953e771cc780e..af8ad7b3fdc43e633b747d8840d85bc22852768e 100644 (file)
@@ -3012,14 +3012,14 @@ 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->datalen == 0 && f->data.ptr) {
+       if (f && f->frametype == AST_FRAME_CONTROL && f->subclass == AST_CONTROL_HOLD && f->datalen == 0 && f->data.ptr) {
                /* fix invalid pointer */
                f->data.ptr = NULL;
 #ifdef AST_DEVMODE
-               ast_log(LOG_ERROR, "Found frame with src '%s' on channel '%s' with datalen zero, but non-null data pointer!\n", f->src, chan->name);
+               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
-               ast_debug(3, "Found frame with src '%s' on channel '%s' with datalen zero, but non-null data pointer!\n", f->src, chan->name);
+               ast_debug(3, "Found HOLD frame with src '%s' on channel '%s' with datalen zero, but non-null data pointer!\n", f->src, chan->name);
 #endif
        }