aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r--apps/app_queue.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index bf48336e0..69a32c61e 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -4852,7 +4852,7 @@ static int aqm_exec(struct ast_channel *chan, void *data)
}
if (!ast_strlen_zero(args.penalty)) {
- if ((sscanf(args.penalty, "%d", &penalty) != 1) || penalty < 0) {
+ if ((sscanf(args.penalty, "%30d", &penalty) != 1) || penalty < 0) {
ast_log(LOG_WARNING, "Penalty '%s' is invalid, must be an integer >= 0\n", args.penalty);
penalty = 0;
}
@@ -5011,7 +5011,7 @@ static int queue_exec(struct ast_channel *chan, void *data)
ast_channel_lock(chan);
user_priority = pbx_builtin_getvar_helper(chan, "QUEUE_PRIO");
if (user_priority) {
- if (sscanf(user_priority, "%d", &prio) == 1) {
+ if (sscanf(user_priority, "%30d", &prio) == 1) {
ast_debug(1, "%s: Got priority %d from ${QUEUE_PRIO}.\n", chan->name, prio);
} else {
ast_log(LOG_WARNING, "${QUEUE_PRIO}: Invalid value (%s), channel %s.\n",
@@ -5026,7 +5026,7 @@ static int queue_exec(struct ast_channel *chan, void *data)
/* Get the maximum penalty from the variable ${QUEUE_MAX_PENALTY} */
if ((max_penalty_str = pbx_builtin_getvar_helper(chan, "QUEUE_MAX_PENALTY"))) {
- if (sscanf(max_penalty_str, "%d", &max_penalty) == 1) {
+ if (sscanf(max_penalty_str, "%30d", &max_penalty) == 1) {
ast_debug(1, "%s: Got max penalty %d from ${QUEUE_MAX_PENALTY}.\n", chan->name, max_penalty);
} else {
ast_log(LOG_WARNING, "${QUEUE_MAX_PENALTY}: Invalid value (%s), channel %s.\n",
@@ -5038,7 +5038,7 @@ static int queue_exec(struct ast_channel *chan, void *data)
}
if ((min_penalty_str = pbx_builtin_getvar_helper(chan, "QUEUE_MIN_PENALTY"))) {
- if (sscanf(min_penalty_str, "%d", &min_penalty) == 1) {
+ if (sscanf(min_penalty_str, "%30d", &min_penalty) == 1) {
ast_debug(1, "%s: Got min penalty %d from ${QUEUE_MIN_PENALTY}.\n", chan->name, min_penalty);
} else {
ast_log(LOG_WARNING, "${QUEUE_MIN_PENALTY}: Invalid value (%s), channel %s.\n",
@@ -6399,7 +6399,7 @@ static int manager_add_queue_member(struct mansession *s, const struct message *
if (ast_strlen_zero(penalty_s))
penalty = 0;
- else if (sscanf(penalty_s, "%d", &penalty) != 1 || penalty < 0)
+ else if (sscanf(penalty_s, "%30d", &penalty) != 1 || penalty < 0)
penalty = 0;
if (ast_strlen_zero(paused_s))
@@ -6639,7 +6639,7 @@ static char *handle_queue_add_member(struct ast_cli_entry *e, int cmd, struct as
queuename = a->argv[5];
interface = a->argv[3];
if (a->argc >= 8) {
- if (sscanf(a->argv[7], "%d", &penalty) == 1) {
+ if (sscanf(a->argv[7], "%30d", &penalty) == 1) {
if (penalty < 0) {
ast_cli(a->fd, "Penalty must be >= 0\n");
penalty = 0;