src/server/daemon/vfs.c

branch
webdav
changeset 277
7608af69739f
parent 276
0cb4eda146c4
child 286
864e2d701dd4
equal deleted inserted replaced
276:0cb4eda146c4 277:7608af69739f
95 } 95 }
96 } 96 }
97 return ucx_map_cstr_put(vfs_type_map, name, vfsCreate); 97 return ucx_map_cstr_put(vfs_type_map, name, vfsCreate);
98 } 98 }
99 99
100
101 VFS* vfs_create(Session *sn, Request *rq, const char *vfs_class, pblock *pb) {
102 vfs_create_func createVFS = ucx_map_cstr_get(vfs_type_map, vfs_class);
103 if(!createVFS) {
104 log_ereport(LOG_MISCONFIG, "vfs_create: unkown VFS type %s", vfs_class);
105 return NULL;
106 }
107
108 return createVFS(sn, rq, pb);
109 }
110
100 VFSContext* vfs_request_context(Session *sn, Request *rq) { 111 VFSContext* vfs_request_context(Session *sn, Request *rq) {
101 WS_ASSERT(sn); 112 WS_ASSERT(sn);
102 WS_ASSERT(rq); 113 WS_ASSERT(rq);
103 114
104 VFSContext *ctx = pool_malloc(sn->pool, sizeof(VFSContext)); 115 VFSContext *ctx = pool_malloc(sn->pool, sizeof(VFSContext));

mercurial