src/server/webdav/webdav.c

branch
webdav
changeset 325
2d14055c3543
parent 322
f26bd6e17594
child 327
24e740ed90b3
equal deleted inserted replaced
324:44cf877b3d9f 325:2d14055c3543
87 87
88 int webdav_register_backend(const char *name, webdav_create_func webdavCreate) { 88 int webdav_register_backend(const char *name, webdav_create_func webdavCreate) {
89 return ucx_map_cstr_put(webdav_type_map, name, webdavCreate); 89 return ucx_map_cstr_put(webdav_type_map, name, webdavCreate);
90 } 90 }
91 91
92
93 WebdavBackend* webdav_create(Session *sn, Request *rq, const char *dav_class, pblock *pb) {
94 webdav_create_func createDav = ucx_map_cstr_get(webdav_type_map, dav_class);
95 if(!createDav) {
96 log_ereport(LOG_MISCONFIG, "webdav_create: unkown dav type %s", dav_class);
97 return NULL;
98 }
99
100 return createDav(sn, rq, pb);
101 }
102
92 static WSBool webdav_is_initialized = FALSE; 103 static WSBool webdav_is_initialized = FALSE;
93 104
94 int webdav_init(pblock *pb, Session *sn, Request *rq) { 105 int webdav_init(pblock *pb, Session *sn, Request *rq) {
95 if(webdav_is_initialized) { 106 if(webdav_is_initialized) {
96 return REQ_NOACTION; 107 return REQ_NOACTION;

mercurial