diff options
author | Mark Spencer <markster@digium.com> | 2004-12-19 17:16:39 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-12-19 17:16:39 +0000 |
commit | 374c9c1789e384531fdc4a4d2d5a7f39be32f8a9 (patch) | |
tree | 553581ea974ccb2620756ccfae428d71791f755f /pbx.c | |
parent | 933f3a22f42e917242fd2f3cf8f9d5c4618eaa88 (diff) |
SMS fix, pbx optimization (bug #3098)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx.c')
-rwxr-xr-x | pbx.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -3925,7 +3925,7 @@ int ast_async_goto_by_name(const char *channame, const char *context, const char return res; } -static void ext_strncpy(char *dst, const char *src, int len) +static int ext_strncpy(char *dst, const char *src, int len) { int count=0; @@ -3944,6 +3944,8 @@ static void ext_strncpy(char *dst, const char *src, int len) count++; } *dst = '\0'; + + return count; } /* @@ -4002,13 +4004,11 @@ int ast_add_extension2(struct ast_context *con, p += strlen(label) + 1; } tmp->exten = p; - ext_strncpy(tmp->exten, extension, strlen(extension) + 1); - p += strlen(extension) + 1; + p += ext_strncpy(tmp->exten, extension, strlen(extension) + 1) + 1; tmp->priority = priority; tmp->cidmatch = p; if (callerid) { - ext_strncpy(tmp->cidmatch, callerid, strlen(callerid) + 1); - p += strlen(callerid) + 1; + p += ext_strncpy(tmp->cidmatch, callerid, strlen(callerid) + 1) + 1; tmp->matchcid = 1; } else { tmp->cidmatch[0] = '\0'; |