[asterisk-commits] mmichelson: branch mmichelson/issue13538 r161868 - /team/mmichelson/issue1353...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Dec 8 15:17:37 CST 2008


Author: mmichelson
Date: Mon Dec  8 15:17:36 2008
New Revision: 161868

URL: http://svn.digium.com/view/asterisk?view=rev&rev=161868
Log:
Add some debug and error messages

Modified:
    team/mmichelson/issue13538/funcs/func_audiohookinherit.c

Modified: team/mmichelson/issue13538/funcs/func_audiohookinherit.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/issue13538/funcs/func_audiohookinherit.c?view=diff&rev=161868&r1=161867&r2=161868
==============================================================================
--- team/mmichelson/issue13538/funcs/func_audiohookinherit.c (original)
+++ team/mmichelson/issue13538/funcs/func_audiohookinherit.c Mon Dec  8 15:17:36 2008
@@ -135,11 +135,13 @@
 	struct audiohook_inheritance_datastore *audiohook_inheritance_datastore = NULL;
 
 	if (!(datastore = ast_datastore_alloc(&audiohook_inheritance_info, NULL))) {
+		ast_log(LOG_ERROR, "Could not allocate data for datastore to contain audiohook inheritance info on channel %s\n", chan->name);
 		return NULL;
 	}
 
 	if (!(audiohook_inheritance_datastore = ast_calloc(1, sizeof(*audiohook_inheritance_datastore)))) {
 		ast_datastore_free(datastore);
+		ast_log(LOG_ERROR, "Could not allocate data for audiohook inheritance datastore\n");
 		return NULL;
 	}
 
@@ -154,6 +156,7 @@
 	struct inheritable_audiohook_list *inheritable_audiohook_list = allow ? &audiohook_inheritance_datastore->allowed_list : &audiohook_inheritance_datastore->unallowed_list;
 
 	if (!inheritable_audiohook) {
+		ast_log(LOG_ERROR, "Could not allocate memory for inheritable audiohook structure\n");
 		return -1;
 	}
 
@@ -198,12 +201,14 @@
 	if (allow) {
 		AST_LIST_TRAVERSE(&inheritance_datastore->allowed_list, inheritable_audiohook, list) {
 			if (!strcasecmp(inheritable_audiohook->source, data)) {
+				ast_debug(2, "Audiohook source %s is already set up to be inherited from channel %s\n", data, chan->name);
 				return 0;
 			}
 		}
 	} else {
 		AST_LIST_TRAVERSE(&inheritance_datastore->unallowed_list, inheritable_audiohook, list) {
 			if (!strcasecmp(inheritable_audiohook->source, data)) {
+				ast_debug(2, "Audiohook source %s is already prevented from being inherited by channel %s\n", data, chan->name);
 				return 0;
 			}
 		}




More information about the asterisk-commits mailing list