[asterisk-commits] branch 1.2 r11058 - /branches/1.2/channel.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Feb 24 21:24:04 MST 2006


Author: kpfleming
Date: Fri Feb 24 22:23:48 2006
New Revision: 11058

URL: http://svn.digium.com/view/asterisk?rev=11058&view=rev
Log:
ensure that spy frame queueing is able to deal with translation failing for any reason (issue #6546)

Modified:
    branches/1.2/channel.c

Modified: branches/1.2/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channel.c?rev=11058&r1=11057&r2=11058&view=diff
==============================================================================
--- branches/1.2/channel.c (original)
+++ branches/1.2/channel.c Fri Feb 24 22:23:48 2006
@@ -1164,7 +1164,12 @@
 						trans->last_format = f->subclass;
 					}
 				}
-				translated_frame = ast_translate(trans->path, f, 0);
+				if (!(translated_frame = ast_translate(trans->path, f, 0))) {
+					ast_log(LOG_ERROR, "Translation to %s failed, dropping frame for spies\n",
+						ast_getformatname(AST_FORMAT_SLINEAR));
+					ast_mutex_unlock(&spy->lock);
+					break;
+				}
 			}
 
 			for (last = queue->head; last && last->next; last = last->next);



More information about the asterisk-commits mailing list