[Asterisk-cvs] asterisk pbx.c,1.179,1.180
anthm at lists.digium.com
anthm at lists.digium.com
Thu Dec 2 13:09:43 CST 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv16078
Modified Files:
pbx.c
Log Message:
fix small goto logic issue
Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -d -r1.179 -r1.180
--- pbx.c 1 Dec 2004 01:28:07 -0000 1.179
+++ pbx.c 2 Dec 2004 18:08:11 -0000 1.180
@@ -3855,13 +3855,13 @@
}
int ast_explicit_goto(struct ast_channel *chan, const char *context, const char *exten, int priority) {
- if(chan && !ast_check_hangup(chan)) {
+ if(chan) {
if (context && !ast_strlen_zero(context))
strncpy(chan->context, context, sizeof(chan->context) - 1);
if (exten && !ast_strlen_zero(exten))
strncpy(chan->exten, exten, sizeof(chan->context) - 1);
if (priority)
- chan->priority = priority - 1;
+ chan->priority = priority;
return 0;
}
return -1;
@@ -3874,7 +3874,7 @@
if (chan->pbx) {
/* This channel is currently in the PBX */
- ast_explicit_goto(chan, context, exten, priority);
+ ast_explicit_goto(chan, context, exten, priority - 1);
ast_softhangup_nolock(chan, AST_SOFTHANGUP_ASYNCGOTO);
} else {
/* In order to do it when the channel doesn't really exist within
@@ -5454,7 +5454,7 @@
return goto_func(chan,
context ? context : chan->context,
exten ? exten : chan->exten,
- priority ? priority : chan->priority);
+ (priority ? priority : chan->priority) - 1);
} else
return -3;
}
More information about the svn-commits
mailing list