# HG changeset patch
# User Olaf Wintermann <olaf.wintermann@gmail.com>
# Date 1743532202 -7200
# Node ID 0f1349ffa7191ff36d42cb564a84a602fd9ab624
# Parent  6740836b7a1e7b9469c0c6b90998e530225d3bb8
remove usage of deprecated libxml2 and curl functions

diff -r 6740836b7a1e -r 0f1349ffa719 dav/main.c
--- a/dav/main.c	Sun Feb 23 13:27:27 2025 +0100
+++ b/dav/main.c	Tue Apr 01 20:30:02 2025 +0200
@@ -145,7 +145,8 @@
     
     sys_init();
     xmlGenericErrorFunc fnc = xmlerrorfnc;
-    initGenericErrorDefaultFunc(&fnc);
+    //initGenericErrorDefaultFunc(&fnc);
+    xmlSetGenericErrorFunc(NULL, fnc);
     ctx = dav_context_new();
     dav_add_namespace(ctx, "apache", "http://apache.org/dav/props/");
     int cfgret = load_config(ctx);
diff -r 6740836b7a1e -r 0f1349ffa719 dav/sync.c
--- a/dav/sync.c	Sun Feb 23 13:27:27 2025 +0100
+++ b/dav/sync.c	Tue Apr 01 20:30:02 2025 +0200
@@ -308,7 +308,8 @@
     }
     
     xmlGenericErrorFunc fnc = xmlerrorfnc;
-    initGenericErrorDefaultFunc(&fnc);
+    //initGenericErrorDefaultFunc(&fnc);
+    xmlSetGenericErrorFunc(NULL, fnc);
     sys_init();
     ctx = dav_context_new();
     int cfgret = load_config(ctx) || load_sync_config();
diff -r 6740836b7a1e -r 0f1349ffa719 libidav/methods.c
--- a/libidav/methods.c	Sun Feb 23 13:27:27 2025 +0100
+++ b/libidav/methods.c	Tue Apr 01 20:30:02 2025 +0200
@@ -1102,7 +1102,6 @@
     }
     
     curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, "MKCOL");
-    curl_easy_setopt(handle, CURLOPT_PUT, 0L);  
     curl_easy_setopt(handle, CURLOPT_UPLOAD, 0L);
     
     curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, dummy_write);
@@ -1140,7 +1139,6 @@
     } else {
         curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, "MOVE");
     }
-    curl_easy_setopt(handle, CURLOPT_PUT, 0L);  
     curl_easy_setopt(handle, CURLOPT_UPLOAD, 0L);
     
     curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, dummy_write);
diff -r 6740836b7a1e -r 0f1349ffa719 libidav/resource.c
--- a/libidav/resource.c	Sun Feb 23 13:27:27 2025 +0100
+++ b/libidav/resource.c	Tue Apr 01 20:30:02 2025 +0200
@@ -1115,7 +1115,6 @@
     
     curl_easy_setopt(handle, CURLOPT_HTTPHEADER, NULL);
     curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, NULL);
-    curl_easy_setopt(handle, CURLOPT_PUT, 0L);
     curl_easy_setopt(handle, CURLOPT_UPLOAD, 0L);
     
     curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, write_fnc);
@@ -1662,7 +1661,6 @@
     
     curl_easy_setopt(in->c, CURLOPT_HTTPHEADER, NULL);
     curl_easy_setopt(in->c, CURLOPT_CUSTOMREQUEST, NULL);
-    curl_easy_setopt(in->c, CURLOPT_PUT, 0L);
     curl_easy_setopt(in->c, CURLOPT_UPLOAD, 0L);
     
     curl_multi_add_handle(in->m, in->c);
@@ -1800,7 +1798,6 @@
     curl_easy_setopt(out->c, CURLOPT_HEADERFUNCTION, NULL);
     curl_easy_setopt(out->c, CURLOPT_HTTPHEADER, NULL);
     curl_easy_setopt(out->c, CURLOPT_CUSTOMREQUEST, NULL);
-    curl_easy_setopt(out->c, CURLOPT_PUT, 1L);
     curl_easy_setopt(out->c, CURLOPT_UPLOAD, 1L);
     curl_easy_setopt(out->c, CURLOPT_READFUNCTION, read_fnc);
     curl_easy_setopt(out->c, CURLOPT_READDATA, stream);