static void clean_caches() { clear_propfind_recursive_cache(); free_fetchCtx(propfind_cache); propfind_cache = NULL; SAFE_FREE(_stat_cache.name); SAFE_FREE(_stat_cache.etag ); memset( _stat_cache.file_id, 0, FILE_ID_BUF_SIZE+1 ); SAFE_FREE(_id_cache.uri); SAFE_FREE(_id_cache.id); }
void fill_recursive_propfind_cache(const char *uri, const char *curi) { fetch_resource_list_recursive(uri, curi); if (propfind_recursive_cache_depth <= 2) { DEBUG_WEBDAV("fill_recursive_propfind_cache %s Server maybe did not give us an 'infinity' depth result", curi); /* transform the cache to the normal cache in propfind_cache */ propfind_cache = get_listdir_context_from_recursive_cache(curi); /* clear the cache, it is bogus since the server returned only results for Depth 1 */ clear_propfind_recursive_cache(); } else { DEBUG_WEBDAV("fill_recursive_propfind_cache %s We received %d elements deep for 'infinity' depth (%d folders, %d files)", curi, propfind_recursive_cache_depth, propfind_recursive_cache_folder_count, propfind_recursive_cache_file_count); } }