aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_oss.c
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-14 13:18:40 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-14 13:18:40 +0000
commitea0d4674a604b98a32c5f5b42f1878d3d75af9e0 (patch)
tree01f0ca16e50b44357fb29bdb18793405a071da0f /channels/chan_oss.c
parent2e70fd87205ec4f9c775075b807c65e3703145e3 (diff)
make the 'name' and 'value' fields in ast_variable const char *
This prevents modifying the strings in the stored variables, and catched a few instances where this was actually done. Given the differences between trunk and 1.4 (and the fact that this is effectively an API change) it is better to fix 1.4 independently. These are chan_sip.c::sip_register() chan_skinny.c:: near line 2847 config.c:: near line 1774 logger.c::make_components() res_adsi.c:: near line 1049 I may have missed some instances for modules that do not build here. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89268 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_oss.c')
-rw-r--r--channels/chan_oss.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/channels/chan_oss.c b/channels/chan_oss.c
index 1caf1a378..7c2d60e27 100644
--- a/channels/chan_oss.c
+++ b/channels/chan_oss.c
@@ -212,7 +212,7 @@ END_CONFIG
* Likely we will come up with a better way of doing config file parsing.
*/
#define M_START(var, val) \
- char *__s = var; char *__val = val;
+ const char *__s = var; const char *__val = val;
#define M_END(x) x;
#define M_F(tag, f) if (!strcasecmp((__s), tag)) { f; } else
#define M_BOOL(tag, dst) M_F(tag, (dst) = ast_true(__val) )
@@ -1413,7 +1413,7 @@ static char *console_active(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
/*!
* \brief store the boost factor
*/
-static void store_boost(struct chan_oss_pvt *o, char *s)
+static void store_boost(struct chan_oss_pvt *o, const char *s)
{
double boost = 0;
if (sscanf(s, "%lf", &boost) != 1) {
@@ -1472,7 +1472,7 @@ static struct ast_cli_entry cli_oss[] = {
* invalid or dangerous values (the string is used as argument for
* system("mixer %s")
*/
-static void store_mixer(struct chan_oss_pvt *o, char *s)
+static void store_mixer(struct chan_oss_pvt *o, const char *s)
{
int i;
@@ -1491,7 +1491,7 @@ static void store_mixer(struct chan_oss_pvt *o, char *s)
/*!
* store the callerid components
*/
-static void store_callerid(struct chan_oss_pvt *o, char *s)
+static void store_callerid(struct chan_oss_pvt *o, const char *s)
{
ast_callerid_split(s, o->cid_name, sizeof(o->cid_name), o->cid_num, sizeof(o->cid_num));
}