diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2005-12-03 19:25:33 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2005-12-03 19:25:33 +0000 |
commit | 870f98f02de56e35b87f511544a6cda3d4d8fe69 (patch) | |
tree | f1b09ce6fd8d356c12bfe4e6b4e24e8f97ef1154 /app.c | |
parent | 6a6b88c0e33e0e60dbf8039d24d2e8815d194cae (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: https://origsvn.digium.com/svn/asterisk/trunk@7304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'app.c')
-rw-r--r-- | app.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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; |