diff options
Diffstat (limited to 'src/file_list.c')
-rw-r--r-- | src/file_list.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/file_list.c b/src/file_list.c index c427381..c2027a0 100644 --- a/src/file_list.c +++ b/src/file_list.c @@ -120,6 +120,25 @@ int file_list_remove(file_list_t* list, int fd) return 0; } +int file_list_call_post_process(file_list_t* list, int fd) +{ + if(!list || !(list->mutex_)) + return -1; + + g_mutex_lock(list->mutex_); + slist_element_t* tmp = list->list_.first_; + while(tmp) { + if(((file_t*)tmp->data_)->fd_ == fd) { + log_printf(INFO, "calling post processing for '%s'", ((file_t*)tmp->data_)->path_); + break; + } + tmp = tmp->next_; + } + g_mutex_unlock(list->mutex_); + + return 0; +} + int open_file(file_t* file) { if(!file || file->fd_ > 0) // file already open! |