diff options
-rw-r--r-- | apps/tagcache.c | 4 | ||||
-rw-r--r-- | apps/tagcache.h | 1 | ||||
-rw-r--r-- | apps/tagtree.c | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c index 39ed99fcce..efc779d2e3 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c | |||
@@ -4645,6 +4645,10 @@ bool tagcache_is_initialized(void) | |||
4645 | { | 4645 | { |
4646 | return tc_stat.initialized; | 4646 | return tc_stat.initialized; |
4647 | } | 4647 | } |
4648 | bool tagcache_is_fully_initialized(void) | ||
4649 | { | ||
4650 | return tc_stat.readyvalid; | ||
4651 | } | ||
4648 | bool tagcache_is_usable(void) | 4652 | bool tagcache_is_usable(void) |
4649 | { | 4653 | { |
4650 | return tc_stat.initialized && tc_stat.ready; | 4654 | return tc_stat.initialized && tc_stat.ready; |
diff --git a/apps/tagcache.h b/apps/tagcache.h index b52da76a0f..19608063c8 100644 --- a/apps/tagcache.h +++ b/apps/tagcache.h | |||
@@ -246,6 +246,7 @@ void tagcache_unload_ramcache(void); | |||
246 | #endif | 246 | #endif |
247 | void tagcache_init(void) INIT_ATTR; | 247 | void tagcache_init(void) INIT_ATTR; |
248 | bool tagcache_is_initialized(void); | 248 | bool tagcache_is_initialized(void); |
249 | bool tagcache_is_fully_initialized(void); | ||
249 | bool tagcache_is_usable(void); | 250 | bool tagcache_is_usable(void); |
250 | void tagcache_start_scan(void); | 251 | void tagcache_start_scan(void); |
251 | void tagcache_stop_scan(void); | 252 | void tagcache_stop_scan(void); |
diff --git a/apps/tagtree.c b/apps/tagtree.c index 75caab01d4..0e0536c2fd 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c | |||
@@ -652,7 +652,7 @@ static void tagtree_buffer_event(void *data) | |||
652 | 652 | ||
653 | logf("be:%s", id3->path); | 653 | logf("be:%s", id3->path); |
654 | 654 | ||
655 | while (! tagcache_is_usable()) | 655 | while (! tagcache_is_fully_initialized()) |
656 | yield(); | 656 | yield(); |
657 | 657 | ||
658 | if (!tagcache_find_index(&tcs, id3->path)) | 658 | if (!tagcache_find_index(&tcs, id3->path)) |