summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintae, jeon <intae.jeon@samsung.com>2016-07-01 11:01:10 +0900
committerintae, jeon <intae.jeon@samsung.com>2016-07-01 11:01:10 +0900
commit905062a7b81523f14b1aa0ba5b30c731eb887354 (patch)
tree16883f78a310032feabff0420583db42fa79cd6d
parente7cd0e81dcf168d08bcdf9da90069accd4ce0cc0 (diff)
downloademail-service-accepted/tizen/wearable/20160701.034433.tar.gz
email-service-accepted/tizen/wearable/20160701.034433.tar.bz2
email-service-accepted/tizen/wearable/20160701.034433.zip
Change-Id: I9d464d386684a065850b92e61b3819a9bf38e499 Signed-off-by: intae, jeon <intae.jeon@samsung.com>
-rwxr-xr-xemail-core/email-core-utils.c6
-rw-r--r--email-service1
2 files changed, 5 insertions, 2 deletions
diff --git a/email-core/email-core-utils.c b/email-core/email-core-utils.c
index 4e281fb..911864c 100755
--- a/email-core/email-core-utils.c
+++ b/email-core/email-core-utils.c
@@ -480,6 +480,7 @@ int emcore_get_temp_file_name(char **filename, int *err_code)
int ret = false;
int error = EMAIL_ERROR_NONE;
+ unsigned int seed = clock();
if (filename == NULL) {
EM_DEBUG_EXCEPTION("\t filename[%p]\n", filename);
error = EMAIL_ERROR_INVALID_PARAM;
@@ -496,7 +497,7 @@ int emcore_get_temp_file_name(char **filename, int *err_code)
/* Create Directory If deleted by user*/
emstorage_create_dir_if_delete();
- SNPRINTF(tempname, sizeof(tempname), "%s%c%d", MAILTEMP, DIR_SEPERATOR_CH, rand());
+ SNPRINTF(tempname, sizeof(tempname), "%s%c%d", MAILTEMP, DIR_SEPERATOR_CH, rand_r(&seed));
char *p = EM_SAFE_STRDUP(tempname);
if (p == NULL) {
@@ -522,6 +523,7 @@ int emcore_get_temp_mime_file_name(char **filename, int *err_code)
int ret = false;
int error = EMAIL_ERROR_NONE;
+ unsigned int seed = clock();
if (filename == NULL) {
EM_DEBUG_EXCEPTION("\t filename[%p]\n", filename);
error = EMAIL_ERROR_INVALID_PARAM;
@@ -538,7 +540,7 @@ int emcore_get_temp_mime_file_name(char **filename, int *err_code)
/* Create Directory If deleted by user*/
emstorage_create_dir_if_delete();
- SNPRINTF(tempname, sizeof(tempname), "%s%c%d", TEMPMIME, DIR_SEPERATOR_CH, rand());
+ SNPRINTF(tempname, sizeof(tempname), "%s%c%d", TEMPMIME, DIR_SEPERATOR_CH, rand_r(&seed));
char *p = EM_SAFE_STRDUP(tempname);
if (p == NULL) {
diff --git a/email-service b/email-service
index 221fcc4..6b2c00c 100644
--- a/email-service
+++ b/email-service
@@ -1,4 +1,5 @@
#!/bin/sh
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
source /etc/tizen-platform.conf