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; |