[Asterisk-cvs] asterisk channel.c,1.49,1.50
markster at lists.digium.com
markster at lists.digium.com
Thu Oct 9 08:46:23 CDT 2003
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv9816
Modified Files:
channel.c
Log Message:
Fix helper app
Index: channel.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channel.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- channel.c 1 Oct 2003 21:01:30 -0000 1.49
+++ channel.c 9 Oct 2003 14:12:26 -0000 1.50
@@ -1509,15 +1509,10 @@
while( (var = strtok_r(NULL, "|", &tmp)) ) {
pbx_builtin_setvar( chan, var );
} /* /JDG */
- if (oh->context && *oh->context)
- strncpy(chan->context, oh->context, sizeof(chan->context) - 1);
- if (oh->exten && *oh->exten)
- strncpy(chan->exten, oh->exten, sizeof(chan->exten) - 1);
if (oh->callerid && *oh->callerid)
ast_set_callerid(chan, oh->callerid, 1);
if (oh->account && *oh->account)
ast_cdr_setaccount(chan, oh->account);
- chan->priority = oh->priority;
}
if (callerid && strlen(callerid))
ast_set_callerid(chan, callerid, 1);
@@ -1561,8 +1556,18 @@
ast_log(LOG_NOTICE, "Unable to request channel %s/%s\n", type, (char *)data);
} else
ast_log(LOG_NOTICE, "Unable to request channel %s/%s\n", type, (char *)data);
- if (chan && (chan->_state == AST_STATE_UP))
- state = AST_CONTROL_ANSWER;
+ if (chan) {
+ /* Final fixups */
+ if (oh) {
+ if (oh->context && *oh->context)
+ strncpy(chan->context, oh->context, sizeof(chan->context) - 1);
+ if (oh->exten && *oh->exten)
+ strncpy(chan->exten, oh->exten, sizeof(chan->exten) - 1);
+ chan->priority = oh->priority;
+ }
+ if (chan->_state == AST_STATE_UP)
+ state = AST_CONTROL_ANSWER;
+ }
if (outstate)
*outstate = state;
if (chan && res <= 0) {
More information about the svn-commits
mailing list