src/server/plugins/postgresql/init.c

branch
webdav
changeset 303
ad9ba51c8634
parent 276
0cb4eda146c4
child 325
2d14055c3543
--- a/src/server/plugins/postgresql/init.c	Tue Apr 19 19:15:23 2022 +0200
+++ b/src/server/plugins/postgresql/init.c	Tue Apr 19 20:32:45 2022 +0200
@@ -30,8 +30,9 @@
 
 #include "resource.h"
 #include "vfs.h"
+#include "webdav.h"
 
-int pg_init(pblock *pb, Session *sn, Request *Rq) {
+int pg_init(pblock *pb, Session *sn, Request *rq) {
     if(resourcepool_register_type("postgresql", pg_get_resource_type())) {
         log_ereport(LOG_FAILURE, "pg-init: Cannot register resourcepool type");
         return REQ_ABORTED;
@@ -48,3 +49,11 @@
 int pg_register_vfs(pblock *pb) {
     return vfs_register_type("postgresql", pg_vfs_create);
 }
+
+int pg_register_webdav_backend(pblock *pb) {
+    if(webdav_register_backend("postgresql", pg_webdav_create)) {
+        return 1;
+    }
+    return 0;
+}
+

mercurial