aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_minivm.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-27 18:06:20 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-27 18:06:20 +0000
commitb4fbad49e379092fb723442d0c5ee9d070bab2a8 (patch)
treeb8b25902405e22c9695c7f960ac27ec63e6fd3ad /apps/app_minivm.c
parent418427fdca28e641ec8f7397eea53751163513de (diff)
Merged revisions 184726 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r184726 | russell | 2009-03-27 13:04:43 -0500 (Fri, 27 Mar 2009) | 2 lines Use ast_random() instead of rand() to ensure we use the best RNG available. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@184727 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_minivm.c')
-rw-r--r--apps/app_minivm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_minivm.c b/apps/app_minivm.c
index cce2fafb5..c88ac7aa5 100644
--- a/apps/app_minivm.c
+++ b/apps/app_minivm.c
@@ -1031,7 +1031,7 @@ static int sendmail(struct minivm_template *template, struct minivm_account *vmu
}
ast_debug(4, "-_-_- Fromstring now: %s\n", ast_strlen_zero(passdata) ? "-default-" : passdata);
- fprintf(p, "Message-ID: <Asterisk-%d-%s-%d-%s>\n", (unsigned int)rand(), vmu->username, (int)getpid(), who);
+ fprintf(p, "Message-ID: <Asterisk-%d-%s-%d-%s>\n", (unsigned int)ast_random(), vmu->username, (int)getpid(), who);
len_passdata = strlen(vmu->fullname) * 2 + 3;
passdata2 = alloca(len_passdata);
if (!ast_strlen_zero(vmu->email))
@@ -1064,7 +1064,7 @@ static int sendmail(struct minivm_template *template, struct minivm_account *vmu
fprintf(p, "MIME-Version: 1.0\n");
/* Something unique. */
- snprintf(bound, sizeof(bound), "voicemail_%s%d%d", vmu->username, (int)getpid(), (unsigned int)rand());
+ snprintf(bound, sizeof(bound), "voicemail_%s%d%d", vmu->username, (int)getpid(), (unsigned int)ast_random());
fprintf(p, "Content-Type: multipart/mixed; boundary=\"%s\"\n\n\n", bound);