| 1132 | } |
| 1133 | |
| 1134 | static 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 | |
| 1162 | static dav_error * dav_fs_append_locks(dav_lockdb *lockdb, |
| 1163 | const dav_resource *resource, |
nothing calls this directly
no test coverage detected