cache: return error on cache invalid usage
authorLukasz Stanislawski <l.stanislaws@samsung.com>
Fri, 26 Jun 2015 18:25:41 +0000 (20:25 +0200)
committerLukasz Stanislawski <l.stanislaws@samsung.com>
Fri, 26 Jun 2015 18:25:41 +0000 (20:25 +0200)
Change-Id: I1178244aeaa75ab3213ce81eddbe4e011da52789

src/object_cache.c

index 454392c..3051847 100644 (file)
@@ -194,6 +194,11 @@ void
 object_cache_build_async(AtspiAccessible *root, int bulk_size, ObjectCacheReadyCb cb, void *ud)
 {
    DEBUG("START");
+   if (idler)
+      {
+         ERROR("Invalid usage. Async cache build is ongoing...");
+         return;
+      }
    _object_cache_free_internal();
 
    callback = cb;