diff options
author | Christian Pointner <equinox@helsinki.at> | 2011-04-20 14:31:37 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2011-04-20 14:31:37 (GMT) |
commit | c8bc6703879da5a96dbc1319a07fa307cf1892f1 (patch) | |
tree | 0609dcb236987385401664ffc3a3b5082c042f02 /src/file_list.c | |
parent | 011afcdbf0614cc61dd4022448122fe40cfa39ff (diff) |
added option for post processing
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! |