summaryrefslogtreecommitdiff
path: root/src/media-thumbnail.c
diff options
context:
space:
mode:
authorHyunjun Ko <zzoon.ko@samsung.com>2012-02-10 14:43:37 +0900
committerHyunjun Ko <zzoon.ko@samsung.com>2012-02-10 14:43:37 +0900
commit28aef6d6021b790ac6cda467936ed42082dfd8dd (patch)
treeb8ab014a90bbe6386478dc331e4f0f7921e1653a /src/media-thumbnail.c
parent87d4884d38e94105cea0640175e8e70604a23638 (diff)
downloadlibmedia-thumbnail-28aef6d6021b790ac6cda467936ed42082dfd8dd.tar.gz
libmedia-thumbnail-28aef6d6021b790ac6cda467936ed42082dfd8dd.tar.bz2
libmedia-thumbnail-28aef6d6021b790ac6cda467936ed42082dfd8dd.zip
Push the laste code of libmedia-thumbnail
Diffstat (limited to 'src/media-thumbnail.c')
-rwxr-xr-xsrc/media-thumbnail.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/media-thumbnail.c b/src/media-thumbnail.c
index 585be8c..7d7165c 100755
--- a/src/media-thumbnail.c
+++ b/src/media-thumbnail.c
@@ -27,7 +27,6 @@
#include "media-thumb-db.h"
#include <glib.h>
-#include <media-svc.h>
int thumbnail_request_from_db(const char *origin_path, char *thumb_path, int max_length)
{
@@ -61,11 +60,16 @@ int thumbnail_request_from_db(const char *origin_path, char *thumb_path, int max
thumb_err("Path : %s", origin_path);
- err = minfo_init();
+ //err = minfo_init();
+ err = _media_thumb_db_connect();
+ if (err < 0) {
+ thumb_err("_media_thumb_mb_svc_connect failed: %d", err);
+ return MEDIA_THUMB_ERROR_DB;
+ }
err = _media_thumb_get_thumb_from_db(origin_path, thumb_path, max_length, &need_update_db);
if (err == 0) {
- minfo_finalize();
+ _media_thumb_db_disconnect();
return MEDIA_THUMB_ERROR_NONE;
}
@@ -73,7 +77,7 @@ int thumbnail_request_from_db(const char *origin_path, char *thumb_path, int max
err = _media_thumb_request(THUMB_REQUEST_DB, MEDIA_THUMB_LARGE, origin_path, thumb_path, max_length, &thumb_info);
if (err < 0) {
thumb_err("_media_thumb_request failed : %d", err);
- minfo_finalize();
+ _media_thumb_db_disconnect();
return err;
}
@@ -85,7 +89,7 @@ int thumbnail_request_from_db(const char *origin_path, char *thumb_path, int max
}
}
- minfo_finalize();
+ _media_thumb_db_disconnect();
return MEDIA_THUMB_ERROR_NONE;
}