src/server/test/vfs.c

branch
webdav
changeset 323
dc5b0fee49df
parent 251
f727a21497bb
child 415
d938228c382e
equal deleted inserted replaced
322:f26bd6e17594 323:dc5b0fee49df
188 file = ucx_map_sstr_get(vfs->files, s_path); 188 file = ucx_map_sstr_get(vfs->files, s_path);
189 if(!file) { 189 if(!file) {
190 if((oflags & O_CREAT) == O_CREAT) { 190 if((oflags & O_CREAT) == O_CREAT) {
191 file = pool_malloc(ctx->sn->pool, sizeof(TestVFSFile)); 191 file = pool_malloc(ctx->sn->pool, sizeof(TestVFSFile));
192 ZERO(file, sizeof(TestVFSFile)); 192 ZERO(file, sizeof(TestVFSFile));
193 file->file.ctx = ctx;
193 file->path = sstrdup_a(session_get_allocator(ctx->sn), s_path); 194 file->path = sstrdup_a(session_get_allocator(ctx->sn), s_path);
194 file->file.io = &test_file_io; 195 file->file.io = &test_file_io;
195 196
196 file->content = pool_calloc(ctx->sn->pool, 1, sizeof(UcxBuffer)); 197 file->content = pool_calloc(ctx->sn->pool, 1, sizeof(UcxBuffer));
197 file->content->capacity = 2048; 198 file->content->capacity = 2048;

mercurial