[svn-commits] branch bweschke/bug_5657 - r7483 /team/bweschke/bug_5657/apps/app_dial.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Dec 14 21:39:33 CST 2005


Author: bweschke
Date: Wed Dec 14 21:39:31 2005
New Revision: 7483

URL: http://svn.digium.com/view/asterisk?rev=7483&view=rev
Log:
 Fix compiler and logic errors from previous commit.


Modified:
    team/bweschke/bug_5657/apps/app_dial.c

Modified: team/bweschke/bug_5657/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_5657/apps/app_dial.c?rev=7483&r1=7482&r2=7483&view=diff
==============================================================================
--- team/bweschke/bug_5657/apps/app_dial.c (original)
+++ team/bweschke/bug_5657/apps/app_dial.c Wed Dec 14 21:39:31 2005
@@ -386,6 +386,8 @@
 	struct ast_channel *winner;
 	char *context = NULL;
 	char cidname[AST_MAX_EXTENSION];
+	char *stuff;
+	char *tech;
 
 	single = (outgoing && !outgoing->next && !ast_test_flag(outgoing, OPT_MUSICBACK | OPT_RINGBACK));
 	
@@ -446,10 +448,8 @@
 						       DIAL_NOFORWARDHTML);
 				}
 			} else if (o->chan && (o->chan == winner)) {
-				if (!ast_strlen_zero(o->chan->call_forward) && !ast_test_flag(&opts, OPT_IGNORE_FORWARDING)) {
+				if (!ast_strlen_zero(o->chan->call_forward) && !ast_test_flag(peerflags, OPT_IGNORE_FORWARDING)) {
 					char tmpchan[256];
-					char *stuff;
-					char *tech;
 					ast_copy_string(tmpchan, o->chan->call_forward, sizeof(tmpchan));
 					if ((stuff = strchr(tmpchan, '/'))) {
 						*stuff = '\0';
@@ -542,9 +542,9 @@
 					/* Hangup the original channel now, in case we needed it */
 					ast_hangup(winner);
 					continue;
-				} else if (ast_test_flag(&opts, OPT_IGNORE_FORWARDING)) {
+				} else if (ast_test_flag(peerflags, OPT_IGNORE_FORWARDING)) {
 					if (option_verbose > 2)
-						ast_verbose(VERBOSE_PREFIX_3 "Forwarding %s to '%s/%s' prevented by dial option 'i'\n", in->name, tech, stuff);
+						ast_verbose(VERBOSE_PREFIX_3 "Forwarding %s to '%s' prevented by dial option 'i'\n", in->name, o->chan->call_forward);
 					o->chan = NULL;
 				}
 
@@ -765,6 +765,7 @@
 	char *macro_result = NULL, *macro_transfer_dest = NULL;
 	int digit = 0, result = 0;
 	time_t start_time, answer_time, end_time;
+	char *stuff;
 	struct ast_app *app = NULL;
 
 	char *parse;
@@ -971,7 +972,7 @@
 	/* If a channel group has been specified, get it for use when we create peer channels */
 	outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP");
 
-	ast_copy_flags(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID);
+	ast_copy_flags(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID | OPT_IGNORE_FORWARDING);
 	cur = args.peers;
 	do {
 		/* Remember where to start next time */
@@ -1026,7 +1027,6 @@
 		pbx_builtin_setvar_helper(tmp->chan, "DIALEDPEERNUMBER", numsubst);
 		if (!ast_strlen_zero(tmp->chan->call_forward) && !ast_test_flag(&opts, OPT_IGNORE_FORWARDING)) {
 			char tmpchan[256];
-			char *stuff;
 			char *tech;
 			ast_copy_string(tmpchan, tmp->chan->call_forward, sizeof(tmpchan));
 			if ((stuff = strchr(tmpchan, '/'))) {
@@ -1061,7 +1061,7 @@
 			}
 		} else if (ast_test_flag(&opts, OPT_IGNORE_FORWARDING)) {
 			if (option_verbose > 2)
-				ast_verbose(VERBOSE_PREFIX_3 "Forwarding %s to '%s/%s' prevented by dial option 'i'\n", chan->name, tech, stuff);
+				ast_verbose(VERBOSE_PREFIX_3 "Forwarding %s to '%s' prevented by dial option 'i'\n", chan->name, tmp->chan->call_forward);
 			ast_hangup(tmp->chan);
 			cur = rest;
 			continue;



More information about the svn-commits mailing list