aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_random.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-18 06:29:30 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-18 06:29:30 +0000
commitcc7ccbbabee8c7a92622ee7a2ae509d6b73dbd8b (patch)
tree8ac47b084bc3b26986c059bde325a561ab183217 /apps/app_random.c
parentb55a1f49814f079ec88b797fb45658c3a2b76b89 (diff)
Merged revisions 21037 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r21037 | tilghman | 2006-04-18 01:26:04 -0500 (Tue, 18 Apr 2006) | 2 lines Bug 6984 - off by one error in Random() ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@21038 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_random.c')
-rw-r--r--apps/app_random.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_random.c b/apps/app_random.c
index c8a7f8287..9809a533b 100644
--- a/apps/app_random.c
+++ b/apps/app_random.c
@@ -82,10 +82,10 @@ static int random_exec(struct ast_channel *chan, void *data)
if (!deprecated) {
deprecated = 1;
- ast_log(LOG_WARNING, "Random is deprecated in Asterisk 1.3 or later. Replace with GotoIf($[${RAND(0,99)} + %d >= 100]?%s)\n", probint, s);
+ ast_log(LOG_WARNING, "Random is deprecated in Asterisk 1.4. Replace with GotoIf($[${RAND(0,99)} + %d >= 100]?%s)\n", probint, s);
}
- if ((ast_random() % 100) + probint > 100) {
+ if ((ast_random() % 100) + probint >= 100) {
res = ast_parseable_goto(chan, s);
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Random branches to (%s,%s,%d)\n",