[asterisk-commits] russell: trunk r233100 - in /trunk: ./ main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 4 11:18:27 CST 2009


Author: russell
Date: Fri Dec  4 11:18:22 2009
New Revision: 233100

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=233100
Log:
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.
........

Modified:
    trunk/   (props changed)
    trunk/main/channel.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/channel.c?view=diff&rev=233100&r1=233099&r2=233100
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Fri Dec  4 11:18:22 2009
@@ -3519,14 +3519,14 @@
 		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.integer == 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
 	}
 




More information about the asterisk-commits mailing list