struct fs_settings set;
string_t *last_error;
+ /* may be used by fs_wait_async() to do the waiting */
+ struct ioloop *wait_ioloop, *prev_ioloop;
+
unsigned int files_open_count;
struct fs_file *files;
};
{
int ret;
+ /* recursion not allowed */
+ i_assert(fs->prev_ioloop == NULL);
+
if (fs->v.wait_async == NULL)
ret = 0;
else T_BEGIN {
+ fs->prev_ioloop = current_ioloop;
ret = fs->v.wait_async(fs);
+ i_assert(current_ioloop == fs->prev_ioloop);
+ fs->prev_ioloop = NULL;
} T_END;
return ret;
}
+
+
int fs_lock(struct fs_file *file, unsigned int secs, struct fs_lock **lock_r)
{
int ret;