[Asterisk-cvs] asterisk pbx.c,1.47,1.48
markster at lists.digium.com
markster at lists.digium.com
Wed Sep 10 00:23:40 CDT 2003
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv24152
Modified Files:
pbx.c
Log Message:
Fix small logic errors (bug #242)
Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** pbx.c 8 Sep 2003 21:52:45 -0000 1.47
--- pbx.c 10 Sep 2003 05:24:49 -0000 1.48
***************
*** 1135,1139 ****
if (app) {
if (c->context != context)
! strncpy(c->context, context, sizeof(c->context-1));
if (c->exten != exten)
strncpy(c->exten, exten, sizeof(c->exten)-1);
--- 1135,1139 ----
if (app) {
if (c->context != context)
! strncpy(c->context, context, sizeof(c->context)-1);
if (c->exten != exten)
strncpy(c->exten, exten, sizeof(c->exten)-1);
***************
*** 2513,2517 ****
/* try to lock contexts */
if (ast_lock_contexts()) {
! ast_cli(LOG_WARNING, "Failed to lock contexts list\n");
return RESULT_FAILURE;
}
--- 2513,2517 ----
/* try to lock contexts */
if (ast_lock_contexts()) {
! ast_log(LOG_WARNING, "Failed to lock contexts list\n");
return RESULT_FAILURE;
}
***************
*** 3799,3808 ****
if (option_verbose > 3)
ast_verbose(VERBOSE_PREFIX_4 "Channel %s was answered.\n", chan->name);
! if (context && strlen(context))
strncpy(chan->context, context, sizeof(chan->context) - 1);
! if (exten && strlen(exten))
strncpy(chan->exten, exten, sizeof(chan->exten) - 1);
! if (callerid && strlen(callerid))
! strncpy(chan->callerid, callerid, sizeof(chan->callerid) - 1);
if (priority > 0)
chan->priority = priority;
--- 3799,3812 ----
if (option_verbose > 3)
ast_verbose(VERBOSE_PREFIX_4 "Channel %s was answered.\n", chan->name);
! if (context && *context)
strncpy(chan->context, context, sizeof(chan->context) - 1);
! if (exten && *exten)
strncpy(chan->exten, exten, sizeof(chan->exten) - 1);
! if (callerid && *callerid) {
! /* XXX call ast_set_callerid? */
! if (chan->callerid)
! free(chan->callerid);
! chan->callerid = strdup(callerid);
! }
if (priority > 0)
chan->priority = priority;
More information about the svn-commits
mailing list