diff options
author | intae, jeon <intae.jeon@samsung.com> | 2016-07-01 11:01:10 +0900 |
---|---|---|
committer | intae, jeon <intae.jeon@samsung.com> | 2016-07-01 11:01:10 +0900 |
commit | 905062a7b81523f14b1aa0ba5b30c731eb887354 (patch) | |
tree | 16883f78a310032feabff0420583db42fa79cd6d | |
parent | e7cd0e81dcf168d08bcdf9da90069accd4ce0cc0 (diff) | |
download | email-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 |
fix Svace issue and shell script issuesubmit/tizen_common/20160701.180000submit/tizen/20160701.023737accepted/tizen/wearable/20160701.034433accepted/tizen/mobile/20160701.034450accepted/tizen/ivi/20160701.034359accepted/tizen/common/20160701.192947
Change-Id: I9d464d386684a065850b92e61b3819a9bf38e499
Signed-off-by: intae, jeon <intae.jeon@samsung.com>
-rwxr-xr-x | email-core/email-core-utils.c | 6 | ||||
-rw-r--r-- | email-service | 1 |
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 |