[svn-commits] oej: trunk r58054 - /trunk/apps/app_stack.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue Mar 6 13:41:21 MST 2007


Author: oej
Date: Tue Mar  6 14:41:21 2007
New Revision: 58054

URL: http://svn.digium.com/view/asterisk?view=rev&rev=58054
Log:
Debug control, debug control.

Modified:
    trunk/apps/app_stack.c

Modified: trunk/apps/app_stack.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_stack.c?view=diff&rev=58054&r1=58053&r2=58054
==============================================================================
--- trunk/apps/app_stack.c (original)
+++ trunk/apps/app_stack.c Tue Mar  6 14:41:21 2007
@@ -154,7 +154,7 @@
 
 	if (oldframe)
 		gosub_release_frame(chan, oldframe);
-	else
+	else if (option_debug)
 		ast_log(LOG_DEBUG, "%s called with an empty gosub stack\n", app_pop);
 
 	return 0;
@@ -210,7 +210,8 @@
 	u = ast_module_user_add(chan);
 
 	if (!stack_store) {
-		ast_log(LOG_DEBUG, "Channel %s has no datastore, so we're allocating one.\n", chan->name);
+		if (option_debug)
+			ast_log(LOG_DEBUG, "Channel %s has no datastore, so we're allocating one.\n", chan->name);
 		stack_store = ast_channel_datastore_alloc(&stack_info, NULL);
 		if (!stack_store) {
 			ast_log(LOG_ERROR, "Unable to allocate new datastore.  Gosub will fail.\n");
@@ -258,7 +259,8 @@
 	for (i = 0; i < args2.argc; i++) {
 		snprintf(argname, sizeof(argname), "ARG%d", i + 1);
 		pbx_builtin_pushvar_helper(chan, argname, args2.argval[i]);
-		ast_log(LOG_DEBUG, "Setting '%s' to '%s'\n", argname, args2.argval[i]);
+		if (option_debug)
+			ast_log(LOG_DEBUG, "Setting '%s' to '%s'\n", argname, args2.argval[i]);
 	}
 
 	/* And finally, save our return address */



More information about the svn-commits mailing list