diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-19 17:16:39 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-19 17:16:39 +0000 |
commit | 62d1e370abe29aae5e494f2b24468980ec64c361 (patch) | |
tree | 553581ea974ccb2620756ccfae428d71791f755f /pbx.c | |
parent | bf9ad997ffd69040efec0d526af1a1e20751f53c (diff) |
SMS fix, pbx optimization (bug #3098)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4482 f38db490-d61c-443f-a65b-d21fe96a405b
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'; |