summaryrefslogtreecommitdiff
path: root/main/features.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/features.c')
-rw-r--r--main/features.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/main/features.c b/main/features.c
index dd62c0c7f..5d0f8ec5d 100644
--- a/main/features.c
+++ b/main/features.c
@@ -857,7 +857,7 @@ static void set_new_chan_name(struct ast_channel *chan)
ast_channel_lock(chan);
seq_num = ast_atomic_fetchadd_int(&seq_num_last, +1);
len = snprintf(dummy, sizeof(dummy), "%s<XFER_%x>", ast_channel_name(chan), seq_num) + 1;
- chan_name = alloca(len);
+ chan_name = ast_alloca(len);
snprintf(chan_name, len, "%s<XFER_%x>", ast_channel_name(chan), seq_num);
ast_channel_unlock(chan);
@@ -2289,8 +2289,8 @@ static int builtin_automonitor(struct ast_channel *chan, struct ast_channel *pee
if (touch_monitor) {
len = strlen(touch_monitor) + 50;
- args = alloca(len);
- touch_filename = alloca(len);
+ args = ast_alloca(len);
+ touch_filename = ast_alloca(len);
snprintf(touch_filename, len, "%s-%ld-%s", S_OR(touch_monitor_prefix, "auto"), (long)time(NULL), touch_monitor);
snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename);
} else {
@@ -2299,8 +2299,8 @@ static int builtin_automonitor(struct ast_channel *chan, struct ast_channel *pee
callee_chan_id = ast_strdupa(S_COR(ast_channel_caller(callee_chan)->id.number.valid,
ast_channel_caller(callee_chan)->id.number.str, ast_channel_name(callee_chan)));
len = strlen(caller_chan_id) + strlen(callee_chan_id) + 50;
- args = alloca(len);
- touch_filename = alloca(len);
+ args = ast_alloca(len);
+ touch_filename = ast_alloca(len);
snprintf(touch_filename, len, "%s-%ld-%s-%s", S_OR(touch_monitor_prefix, "auto"), (long)time(NULL), caller_chan_id, callee_chan_id);
snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename);
}
@@ -2401,8 +2401,8 @@ static int builtin_automixmonitor(struct ast_channel *chan, struct ast_channel *
if (touch_monitor) {
len = strlen(touch_monitor) + 50;
- args = alloca(len);
- touch_filename = alloca(len);
+ args = ast_alloca(len);
+ touch_filename = ast_alloca(len);
snprintf(touch_filename, len, "auto-%ld-%s", (long)time(NULL), touch_monitor);
snprintf(args, len, "%s.%s,b", touch_filename, (touch_format) ? touch_format : "wav");
} else {
@@ -2411,8 +2411,8 @@ static int builtin_automixmonitor(struct ast_channel *chan, struct ast_channel *
callee_chan_id = ast_strdupa(S_COR(ast_channel_caller(callee_chan)->id.number.valid,
ast_channel_caller(callee_chan)->id.number.str, ast_channel_name(callee_chan)));
len = strlen(caller_chan_id) + strlen(callee_chan_id) + 50;
- args = alloca(len);
- touch_filename = alloca(len);
+ args = ast_alloca(len);
+ touch_filename = ast_alloca(len);
snprintf(touch_filename, len, "auto-%ld-%s-%s", (long)time(NULL), caller_chan_id, callee_chan_id);
snprintf(args, len, "%s.%s,b", touch_filename, S_OR(touch_format, "wav"));
}
@@ -3884,7 +3884,7 @@ static struct ast_channel *feature_request_and_dial(struct ast_channel *caller,
disconnect_code = builtin_features[x].exten;
len = strlen(disconnect_code) + 1;
- dialed_code = alloca(len);
+ dialed_code = ast_alloca(len);
memset(dialed_code, 0, len);
break;
}