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

Function dav_fs_has_locks

modules/dav/fs/lock.c:1134–1160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1132}
1133
1134static dav_error * dav_fs_has_locks(dav_lockdb *lockdb,
1135 const dav_resource *resource,
1136 int *locks_present)
1137{
1138 dav_error *err;
1139 apr_datum_t key;
1140
1141 *locks_present = 0;
1142
1143 if ((err = dav_fs_really_open_lockdb(lockdb)) != NULL) {
1144 /* ### insert a higher-level error description */
1145 return err;
1146 }
1147
1148 /*
1149 ** If we opened readonly and the db wasn't there, then there are no
1150 ** locks for this resource. Just exit.
1151 */
1152 if (lockdb->info->db == NULL)
1153 return NULL;
1154
1155 key = dav_fs_build_key(lockdb->info->pool, resource);
1156
1157 *locks_present = dav_dbm_exists(lockdb->info->db, key);
1158
1159 return NULL;
1160}
1161
1162static dav_error * dav_fs_append_locks(dav_lockdb *lockdb,
1163 const dav_resource *resource,

Callers

nothing calls this directly

Calls 3

dav_fs_build_keyFunction · 0.85
dav_dbm_existsFunction · 0.85

Tested by

no test coverage detected