aboutsummaryrefslogtreecommitdiffstats
path: root/app.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-03 19:25:33 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-03 19:25:33 +0000
commit3365b1cc9fd629381e341c2291fc0cfb53a44c36 (patch)
treef1b09ce6fd8d356c12bfe4e6b4e24e8f97ef1154 /app.c
parenta3c74f33dd6c999b8db1cd4281784753ebca997d (diff)
Bug 5858 - Make the chanvars.c functions return a 'const char *'
This should prevent us from unintentionally changing variable values when they're returned from pbx_builtin_getvar_helper. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7304 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'app.c')
-rw-r--r--app.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/app.c b/app.c
index c90767255..60f60cec9 100644
--- a/app.c
+++ b/app.c
@@ -1006,7 +1006,7 @@ int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordf
/* Channel group core functions */
-int ast_app_group_split_group(char *data, char *group, int group_max, char *category, int category_max)
+int ast_app_group_split_group(const char *data, char *group, int group_max, char *category, int category_max)
{
int res=0;
char tmp[256];
@@ -1035,7 +1035,7 @@ int ast_app_group_split_group(char *data, char *group, int group_max, char *cate
return res;
}
-int ast_app_group_set_channel(struct ast_channel *chan, char *data)
+int ast_app_group_set_channel(struct ast_channel *chan, const char *data)
{
int res=0;
char group[80] = "";
@@ -1049,13 +1049,13 @@ int ast_app_group_set_channel(struct ast_channel *chan, char *data)
return res;
}
-int ast_app_group_get_count(char *group, char *category)
+int ast_app_group_get_count(const char *group, const char *category)
{
struct ast_channel *chan;
int count = 0;
- char *test;
+ const char *test;
char cat[80];
- char *s;
+ const char *s;
if (ast_strlen_zero(group))
return 0;
@@ -1074,14 +1074,14 @@ int ast_app_group_get_count(char *group, char *category)
return count;
}
-int ast_app_group_match_get_count(char *groupmatch, char *category)
+int ast_app_group_match_get_count(const char *groupmatch, const char *category)
{
regex_t regexbuf;
struct ast_channel *chan;
int count = 0;
- char *test;
+ const char *test;
char cat[80];
- char *s;
+ const char *s;
if (ast_strlen_zero(groupmatch))
return 0;