summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2012-09-06 01:02:17 +0000
committerMatthew Jordan <mjordan@digium.com>2012-09-06 01:02:17 +0000
commit4058ea15ab8682c32c37af10edeb18cd5e57edb2 (patch)
treef4844a3d2785e23413efd4caac3a8e64dc72c355
parent84849cf413e83cda3ee9cb4ff3ed6e9993723acf (diff)
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. ........ Merged revisions 372390 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 372391 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 372392 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--apps/app_followme.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_followme.c b/apps/app_followme.c
index 9b4a925da..9f39c329d 100644
--- a/apps/app_followme.c
+++ b/apps/app_followme.c
@@ -385,7 +385,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;
@@ -501,7 +501,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);