static void smb_stat_cache_delete(int msg_type, struct process_id src, void *buf, size_t len, void *private_data) { const char *name = (const char *)buf; DEBUG(10,("smb_stat_cache_delete: delete name %s\n", name)); stat_cache_delete(name); }
static void smb_stat_cache_delete(struct messaging_context *msg, void *private_data, uint32_t msg_tnype, struct server_id server_id, DATA_BLOB *data) { const char *name = (const char *)data->data; DEBUG(10,("smb_stat_cache_delete: delete name %s\n", name)); stat_cache_delete(name); }
int stat_cache_delete_parent(stat_cache_t *cache, const char *path) { char *p; log_print(LOG_DEBUG, "stat_cache_delete_parent: %s", path); if ((p = ne_path_parent(path))) { int l = strlen(p); if (strcmp(p, "/") && l) { if (p[l-1] == '/') p[l-1] = 0; } stat_cache_delete(cache, p); stat_cache_updated_children(cache, p, time(NULL) - CACHE_TIMEOUT - 1); free(p); } else { stat_cache_delete(cache, path); stat_cache_updated_children(cache, path, time(NULL) - CACHE_TIMEOUT - 1); } return 0; }
int stat_cache_delete_older(stat_cache_t *cache, const char *path_prefix, unsigned int minimum_local_generation) { struct stat_cache_iterator *iter; struct stat_cache_entry *entry; log_print(LOG_DEBUG, "stat_cache_delete_older: %s", path_prefix); iter = stat_cache_iter_init(cache, path_prefix); while ((entry = stat_cache_iter_current(iter))) { if (entry->value->local_generation < minimum_local_generation) { stat_cache_delete(cache, key2path(entry->key)); } free(entry); stat_cache_iter_next(iter); } stat_cache_iterator_free(iter); return 0; }