[asterisk-commits] russell: trunk r59343 - in /trunk: ./ channels/chan_iax2.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Mar 29 09:56:35 MST 2007


Author: russell
Date: Thu Mar 29 11:56:35 2007
New Revision: 59343

URL: http://svn.digium.com/view/asterisk?view=rev&rev=59343
Log:
Merged revisions 59341 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59341 | russell | 2007-03-29 11:55:39 -0500 (Thu, 29 Mar 2007) | 8 lines

When the IAX2 read callback gets called, return NULL instead of a "null frame".
This will cause Asterisk to hangup the call instead of keep trying whatever it
was doing.  Under normal conditions, this function would *never* be called.
However, the author of this patch says an error will occur that will cause it
to get called every 100 thousand calls or so.  When this does happen, it puts
the channel in a loop that eventually brings down the system.  So, hangup up
the call is certainly a better alternative.  (issue #8286, john)

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_iax2.c

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

Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=59343&r1=59342&r2=59343
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Thu Mar 29 11:56:35 2007
@@ -3125,8 +3125,8 @@
 
 static struct ast_frame *iax2_read(struct ast_channel *c) 
 {
-	ast_log(LOG_NOTICE, "I should never be called!\n");
-	return &ast_null_frame;
+	ast_log(LOG_NOTICE, "I should never be called! Hanging up.\n");
+	return NULL;
 }
 
 static int iax2_start_transfer(unsigned short callno0, unsigned short callno1, int mediaonly)



More information about the asterisk-commits mailing list