[asterisk-commits] file: branch file/ah r58899 - /team/file/ah/main/audiohook.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Mar 14 09:54:17 MST 2007


Author: file
Date: Wed Mar 14 11:54:16 2007
New Revision: 58899

URL: http://svn.digium.com/view/asterisk?view=rev&rev=58899
Log:
Destroy in/out translation paths if present on the audiohooks list when detaching it. This commit done from my local Wendy's to a remote machine over GPRS since I have no local checkout on my laptop.

Modified:
    team/file/ah/main/audiohook.c

Modified: team/file/ah/main/audiohook.c
URL: http://svn.digium.com/view/asterisk/team/file/ah/main/audiohook.c?view=diff&rev=58899&r1=58898&r2=58899
==============================================================================
--- team/file/ah/main/audiohook.c (original)
+++ team/file/ah/main/audiohook.c Wed Mar 14 11:54:16 2007
@@ -296,6 +296,7 @@
  */
 int ast_audiohook_detach_list(struct ast_audiohook_list *audiohook_list)
 {
+	int i = 0;
 	struct ast_audiohook *audiohook = NULL;
 
 	/* Drop any spies */
@@ -328,6 +329,14 @@
 	}
 	AST_LIST_TRAVERSE_SAFE_END
 
+	/* Drop translation paths if present */
+	for (i = 0; i < 2; i++) {
+		if (audiohook_list->in_translate[i].trans_pvt)
+			ast_translator_free_path(audiohook_list->in_translate[i].trans_pvt);
+		if (audiohook_list->out_translate[i].trans_pvt)
+			ast_translator_free_path(audiohook_list->out_translate[i].trans_pvt);
+	}
+	
 	/* Free ourselves */
 	free(audiohook_list);
 



More information about the asterisk-commits mailing list