--- a/libidav/session.c Thu Dec 12 20:01:43 2024 +0100 +++ b/libidav/session.c Mon Jan 06 22:22:55 2025 +0100 @@ -211,7 +211,21 @@ char *log_method; char *log_url; curl_easy_getinfo(sn->handle, CURLINFO_EFFECTIVE_URL, &log_url); +#if LIBCURL_VERSION_NUM >= 0x074800 curl_easy_getinfo(sn->handle, CURLINFO_EFFECTIVE_METHOD , &log_method); +#else + long opt_upload = 0; + curl_easy_getinfo(sn->handle, CURLOPT_UPLOAD, &opt_upload); + char *opt_custom = NULL; + curl_easy_getinfo(sn->handle, CURLOPT_CUSTOMREQUEST, &opt_custom); + if(opt_custom) { + log_method = opt_custom; + } else if(opt_upload) { + log_method = "PUT"; + } else { + log_method = "GET"; + } +#endif char *log_reqbody = NULL; size_t log_reqbodylen = 0; char *log_rpbody = NULL; @@ -337,7 +351,7 @@ } void dav_session_destructor(DavSession *sn) { - cxMempoolDestroy(sn->mp); + cxMempoolFree(sn->mp); curl_easy_cleanup(sn->handle); free(sn); } @@ -632,7 +646,7 @@ return; } - if(cxMapRemoveAndGet(locks->resource_locks, cx_hash_key_str(path))) { + if(!cxMapRemove(locks->resource_locks, cx_hash_key_str(path))) { return; }