return;
}
- g_hash_table_remove(fs->locations, &log->id);
+ if (!g_hash_table_remove(fs->locations, &log->id)) {
+ if (bluesky_verbose)
+ g_warning("Could not find and remove cloud log item from hash table!");
+ }
g_mutex_unlock(fs->lock);
bluesky_cloudlog_stats_update(log, -1);
{
g_assert(log->data_lock_count == 0);
+ if (log->type == LOGTYPE_UNKNOWN)
+ return;
+
log->type = LOGTYPE_UNKNOWN;
log->data_size = 0;
bluesky_string_unref(log->data);
item = g_hash_table_lookup(fs->locations, &id);
if (item == NULL) {
item = bluesky_cloudlog_new(fs, &id);
- g_hash_table_insert(fs->locations, &id, item);
+ bluesky_cloudlog_insert_locked(item);
} else {
bluesky_cloudlog_ref(item);
}