MCPcopy Create free account
hub / github.com/apache/httpd / dav_unlock_walker

Function dav_unlock_walker

modules/dav/main/util_lock.c:386–410  ·  view source on GitHub ↗

dav_unlock_walker: Walker callback function to remove indirect locks */

Source from the content-addressed store, hash-verified

384
385/* dav_unlock_walker: Walker callback function to remove indirect locks */
386static dav_error * dav_unlock_walker(dav_walk_resource *wres, int calltype)
387{
388 dav_walker_ctx *ctx = wres->walk_ctx;
389 dav_error *err;
390
391 /* Before removing the lock, do any auto-checkin required */
392 if (wres->resource->working) {
393 /* ### get rid of this typecast */
394 if ((err = dav_auto_checkin(ctx->r, (dav_resource *) wres->resource,
395 0 /*undo*/, 1 /*unlock*/, NULL))
396 != NULL) {
397 return err;
398 }
399 }
400
401 if ((err = (*ctx->w.lockdb->hooks->remove_lock)(ctx->w.lockdb,
402 wres->resource,
403 ctx->locktoken)) != NULL) {
404 /* ### should we stop or return a multistatus? looks like STOP */
405 /* ### add a higher-level description? */
406 return err;
407 }
408
409 return NULL;
410}
411
412/*
413** dav_get_direct_resource:

Callers

nothing calls this directly

Calls 1

dav_auto_checkinFunction · 0.85

Tested by

no test coverage detected