summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaejeong Kim <backto.kim@samsung.com>2017-05-18 06:00:10 (GMT)
committerHaejeong Kim <backto.kim@samsung.com>2017-05-18 06:00:10 (GMT)
commita7da43c015a4a553c0e1ddd5c569ee09b96bcb01 (patch)
tree2d3efb236f120a6292ceef5f124fd1f61795ec28
parent89ff1f92c8435282d5dafafccd0eedd9d2f06da4 (diff)
downloadlibmedia-thumbnail-a7da43c015a4a553c0e1ddd5c569ee09b96bcb01.zip
libmedia-thumbnail-a7da43c015a4a553c0e1ddd5c569ee09b96bcb01.tar.gz
libmedia-thumbnail-a7da43c015a4a553c0e1ddd5c569ee09b96bcb01.tar.bz2
Add thumb_err_slog() and apply itrefs/changes/82/129782/1
Change-Id: I092b4dc7a2a36712119bfe491bbe831c0ee5708e
-rwxr-xr-xsrc/include/util/media-thumb-debug.h3
-rwxr-xr-xsrc/media-thumb-internal.c2
-rwxr-xr-xsrc/media-thumbnail.c4
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;
}