Add thumb_err_slog() and apply it 82/129782/1
authorHaejeong Kim <backto.kim@samsung.com>
Thu, 18 May 2017 06:00:10 +0000 (15:00 +0900)
committerHaejeong Kim <backto.kim@samsung.com>
Thu, 18 May 2017 06:00:10 +0000 (15:00 +0900)
Change-Id: I092b4dc7a2a36712119bfe491bbe831c0ee5708e

src/include/util/media-thumb-debug.h
src/media-thumb-internal.c
src/media-thumbnail.c

index 3370f15..a4b4607 100755 (executable)
@@ -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 { \
index 2d0ac3d..99e0cc1 100755 (executable)
@@ -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;
        }
 
index 4792ac1..d18ee5d 100755 (executable)
@@ -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;
        }