From a7da43c015a4a553c0e1ddd5c569ee09b96bcb01 Mon Sep 17 00:00:00 2001 From: Haejeong Kim Date: Thu, 18 May 2017 15:00:10 +0900 Subject: [PATCH] Add thumb_err_slog() and apply it Change-Id: I092b4dc7a2a36712119bfe491bbe831c0ee5708e --- src/include/util/media-thumb-debug.h | 3 +++ src/media-thumb-internal.c | 2 +- src/media-thumbnail.c | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/include/util/media-thumb-debug.h b/src/include/util/media-thumb-debug.h index 3370f15..a4b4607 100755 --- a/src/include/util/media-thumb-debug.h +++ b/src/include/util/media-thumb-debug.h @@ -65,6 +65,9 @@ SECURE_LOGW(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \ } while (0) +#define thumb_err_slog(fmt, arg...) do { \ + SECURE_LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \ + } while (0) #define ERR_BUF_LENGHT 256 #define thumb_stderror(fmt) do { \ diff --git a/src/media-thumb-internal.c b/src/media-thumb-internal.c index 2d0ac3d..99e0cc1 100755 --- a/src/media-thumb-internal.c +++ b/src/media-thumb-internal.c @@ -1623,7 +1623,7 @@ int _media_thumb_get_hash_name(const char *file_full_path, ret = ms_user_get_storage_type(uid, file_full_path, &store_type); if((ret != MS_MEDIA_ERR_NONE) || ((store_type != MS_USER_STORAGE_INTERNAL) && (store_type != MS_USER_STORAGE_EXTERNAL))) { - thumb_err("origin path(%s) is invalid. err : [%d] store_type [%d]", file_full_path, ret, store_type); + thumb_err_slog("origin path(%s) is invalid. err : [%d] store_type [%d]", file_full_path, ret, store_type); return MS_MEDIA_ERR_INVALID_PARAMETER; } diff --git a/src/media-thumbnail.c b/src/media-thumbnail.c index 4792ac1..d18ee5d 100755 --- a/src/media-thumbnail.c +++ b/src/media-thumbnail.c @@ -56,7 +56,7 @@ int thumbnail_request_from_db_with_size(const char *origin_path, char *thumb_pat err = ms_user_get_storage_type(uid, origin_path, &store_type); if((err != MS_MEDIA_ERR_NONE) || ((store_type != MS_USER_STORAGE_INTERNAL) && (store_type != MS_USER_STORAGE_EXTERNAL))) { - thumb_err("origin path(%s) is invalid. err : [%d] store_type [%d]", origin_path, err, store_type); + thumb_err_slog("origin path(%s) is invalid. err : [%d] store_type [%d]", origin_path, err, store_type); return MS_MEDIA_ERR_INVALID_PARAMETER; } @@ -111,7 +111,7 @@ int thumbnail_request_from_db_async(unsigned int request_id, const char *origin_ err = ms_user_get_storage_type(uid, origin_path, &store_type); if((err != MS_MEDIA_ERR_NONE) || ((store_type != MS_USER_STORAGE_INTERNAL) && (store_type != MS_USER_STORAGE_EXTERNAL))) { - thumb_err("origin path(%s) is invalid. err : [%d] store_type [%d]", origin_path, err, store_type); + thumb_err_slog("origin path(%s) is invalid. err : [%d] store_type [%d]", origin_path, err, store_type); return MS_MEDIA_ERR_INVALID_PARAMETER; } -- 2.7.4