From: Matthew Jordan Date: Thu, 6 Sep 2012 00:54:30 +0000 (+0000) Subject: Allow configured numbers for FollowMe to be greater than 90 characters X-Git-Tag: 1.8.17.0-rc1~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1ae95fa41f491714e28aa040f0f626dfa78a9e34;p=thirdparty%2Fasterisk.git Allow configured numbers for FollowMe to be greater than 90 characters When parsing a 'number' defined in followme.conf, FollowMe previously parsed the number in the configuration file into a buffer with a length of 90 characters. This can artificially limit some parallel dial scenarios. This patch allows for numbers of any length to be defined in the configuration file. Note that Clod Patry originally wrote a patch to fix this problem and received a Ship It! on the JIRA issue. The patch originally expanded the buffer to 256 characters. Instead, the patch being committed duplicates the string in the config file on the stack before parsing it for consumption by the application. (closes issue ASTERISK-16879) Reported by: Clod Patry Tested by: mjordan patches: followme_no_limit.diff uploaded by Clod Patry (license #5138) Slightly modified for this commit. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@372390 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_followme.c b/apps/app_followme.c index 85363e903d..62d1fdcc17 100644 --- a/apps/app_followme.c +++ b/apps/app_followme.c @@ -331,7 +331,7 @@ static int reload_followme(int reload) char *cat = NULL, *tmp; struct ast_variable *var; struct number *cur, *nm; - char numberstr[90]; + char *numberstr; int timeout; int numorder; const char *takecallstr; @@ -447,7 +447,7 @@ static int reload_followme(int reload) int idx = 0; /* Add a new number */ - ast_copy_string(numberstr, var->value, sizeof(numberstr)); + numberstr = ast_strdupa(var->value); if ((tmp = strchr(numberstr, ','))) { *tmp++ = '\0'; timeout = atoi(tmp);