Add logic for check manage queue 36/62736/2
authorMinje Ahn <minje.ahn@samsung.com>
Fri, 18 Mar 2016 00:45:31 +0000 (09:45 +0900)
committerMinje ahn <minje.ahn@samsung.com>
Mon, 21 Mar 2016 07:50:40 +0000 (00:50 -0700)
Change-Id: Ib53097e4ee2298e081ecaa96a9db2d536caf24fd
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
packaging/libmedia-thumbnail.spec
src/ipc/media-thumb-ipc.c

index 82adb8e..7573039 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmedia-thumbnail
 Summary:    Media thumbnail service library for multimedia applications
-Version: 0.1.91
+Version: 0.1.92
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0 and public domain
index aded136..f8f213f 100755 (executable)
@@ -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;
 }