dav_unlock_walker: Walker callback function to remove indirect locks */
| 384 | |
| 385 | /* dav_unlock_walker: Walker callback function to remove indirect locks */ |
| 386 | static 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: |
nothing calls this directly
no test coverage detected