summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2016-03-18 09:45:31 +0900
committerMinje ahn <minje.ahn@samsung.com>2016-03-21 00:50:40 -0700
commit23016f05716dd46ef3b7bb564d122c6a2f84d9ac (patch)
tree45481edef6a0301b3bb2c18271239a313674b608 /src
parent26c68eb12b1f1723a8fddcf2a3709d8a8331b523 (diff)
downloadlibmedia-thumbnail-23016f05716dd46ef3b7bb564d122c6a2f84d9ac.tar.gz
libmedia-thumbnail-23016f05716dd46ef3b7bb564d122c6a2f84d9ac.tar.bz2
libmedia-thumbnail-23016f05716dd46ef3b7bb564d122c6a2f84d9ac.zip
Add logic for check manage queue
Change-Id: Ib53097e4ee2298e081ecaa96a9db2d536caf24fd Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/ipc/media-thumb-ipc.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ipc/media-thumb-ipc.c b/src/ipc/media-thumb-ipc.c
index aded136..f8f213f 100755
--- a/src/ipc/media-thumb-ipc.c
+++ b/src/ipc/media-thumb-ipc.c
@@ -324,6 +324,28 @@ int __media_thumb_check_req_queue(const char *path)
}
}
+ if (g_manage_queue != NULL) {
+ req_len = g_queue_get_length(g_manage_queue);
+
+ if (req_len <= 0) {
+// thumb_dbg("There is no request in the queue");
+ } else {
+ for (i = 0; i < req_len; i++) {
+ thumbReq *req = NULL;
+ req = (thumbReq *)g_queue_peek_nth(g_manage_queue, i);
+ if (req == NULL) continue;
+
+ if (strncmp(path, req->path, strlen(path)) == 0) {
+ //thumb_dbg("Same Request - %s", path);
+ return MS_MEDIA_ERR_INVALID_PARAMETER;
+
+ break;
+ }
+ }
+ }
+ }
+
+
return MS_MEDIA_ERR_NONE;
}