Skip to content
Snippets Groups Projects
Commit 8a066de9 authored by Tilghman Lesher's avatar Tilghman Lesher
Browse files

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: https://origsvn.digium.com/svn/asterisk/trunk@21038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 5bcdea51
No related branches found
No related tags found
No related merge requests found
......@@ -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",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment