diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-27 18:04:43 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-27 18:04:43 +0000 |
commit | 34087ec576d4a7446ecd9fd0ed97430b57c4004b (patch) | |
tree | cb4e07429ebca9e585a32b457c2f2a3ef9ac2173 /apps/app_minivm.c | |
parent | 4bc54633d7b407f3154a8b8dd5939b8c3f674ea9 (diff) |
Use ast_random() instead of rand() to ensure we use the best RNG available.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@184726 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_minivm.c')
-rw-r--r-- | apps/app_minivm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_minivm.c b/apps/app_minivm.c index c4bbce43d..3e5058067 100644 --- a/apps/app_minivm.c +++ b/apps/app_minivm.c @@ -1177,7 +1177,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)) @@ -1210,7 +1210,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); |