mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-18 15:49:56 +00:00
strncpy to ast_copy_string
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -164,7 +164,7 @@ static int disa_exec(struct ast_channel *chan, void *data)
|
|||||||
ourcontext = strsep(&stringp, "|");
|
ourcontext = strsep(&stringp, "|");
|
||||||
/* if context specified, save 2nd arg and parse third */
|
/* if context specified, save 2nd arg and parse third */
|
||||||
if (ourcontext) {
|
if (ourcontext) {
|
||||||
strncpy(arg2,ourcontext, sizeof(arg2) - 1);
|
ast_copy_string(arg2, ourcontext, sizeof(arg2));
|
||||||
ourcallerid = strsep(&stringp,"|");
|
ourcallerid = strsep(&stringp,"|");
|
||||||
}
|
}
|
||||||
/* if context not specified, use "disa" */
|
/* if context not specified, use "disa" */
|
||||||
@@ -306,7 +306,7 @@ static int disa_exec(struct ast_channel *chan, void *data)
|
|||||||
k|=1; /* In number mode */
|
k|=1; /* In number mode */
|
||||||
i = 0; /* re-set buffer pointer */
|
i = 0; /* re-set buffer pointer */
|
||||||
exten[sizeof(acctcode)] = 0;
|
exten[sizeof(acctcode)] = 0;
|
||||||
strncpy(acctcode,exten, sizeof(acctcode) - 1);
|
ast_copy_string(acctcode, exten, sizeof(acctcode));
|
||||||
exten[0] = 0;
|
exten[0] = 0;
|
||||||
ast_log(LOG_DEBUG,"Successful DISA log-in on chan %s\n",chan->name);
|
ast_log(LOG_DEBUG,"Successful DISA log-in on chan %s\n",chan->name);
|
||||||
continue;
|
continue;
|
||||||
@@ -353,7 +353,7 @@ static int disa_exec(struct ast_channel *chan, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!ast_strlen_zero(acctcode))
|
if (!ast_strlen_zero(acctcode))
|
||||||
strncpy(chan->accountcode, acctcode, sizeof(chan->accountcode) - 1);
|
ast_copy_string(chan->accountcode, acctcode, sizeof(chan->accountcode));
|
||||||
|
|
||||||
ast_cdr_reset(chan->cdr, AST_CDR_FLAG_POSTED);
|
ast_cdr_reset(chan->cdr, AST_CDR_FLAG_POSTED);
|
||||||
ast_explicit_goto(chan, ourcontext, exten, 1);
|
ast_explicit_goto(chan, ourcontext, exten, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user