|
@@ -12711,11 +12711,14 @@ dav_lock_file(struct mg_connection *conn, const char *path)
|
|
int i;
|
|
int i;
|
|
uint64_t LOCK_DURATION_NS =
|
|
uint64_t LOCK_DURATION_NS =
|
|
(uint64_t)(LOCK_DURATION_S) * (uint64_t)1000000000;
|
|
(uint64_t)(LOCK_DURATION_S) * (uint64_t)1000000000;
|
|
- struct twebdav_lock *dav_lock = conn->phys_ctx->webdav_lock;
|
|
|
|
|
|
+ struct twebdav_lock *dav_lock = NULL;
|
|
|
|
|
|
- if (!path || !conn->dom_ctx || !conn->request_info.remote_user) {
|
|
|
|
|
|
+ if (!path || !conn
|
|
|
|
+ || !conn->dom_ctx || !conn->request_info.remote_user || !conn->phys_ctx) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ dav_lock = conn->phys_ctx->webdav_lock;
|
|
mg_get_request_link(conn, link_buf, sizeof(link_buf));
|
|
mg_get_request_link(conn, link_buf, sizeof(link_buf));
|
|
|
|
|
|
/* const char *refresh = mg_get_header(conn, "If"); */
|
|
/* const char *refresh = mg_get_header(conn, "If"); */
|