** dav_fs_really_open_lockdb: ** ** If the database hasn't been opened yet, then open the thing. */
| 298 | ** If the database hasn't been opened yet, then open the thing. |
| 299 | */ |
| 300 | static dav_error * dav_fs_really_open_lockdb(dav_lockdb *lockdb) |
| 301 | { |
| 302 | dav_error *err; |
| 303 | |
| 304 | if (lockdb->info->opened) |
| 305 | return NULL; |
| 306 | |
| 307 | err = dav_dbm_open_direct(lockdb->info->pool, |
| 308 | lockdb->info->lockdb_path, |
| 309 | lockdb->ro, |
| 310 | &lockdb->info->db); |
| 311 | if (err != NULL) { |
| 312 | return dav_push_error(lockdb->info->pool, |
| 313 | HTTP_INTERNAL_SERVER_ERROR, |
| 314 | DAV_ERR_LOCK_OPENDB, |
| 315 | "Could not open the lock database.", |
| 316 | err); |
| 317 | } |
| 318 | |
| 319 | /* all right. it is opened now. */ |
| 320 | lockdb->info->opened = 1; |
| 321 | |
| 322 | return NULL; |
| 323 | } |
| 324 | |
| 325 | /* |
| 326 | ** dav_fs_open_lockdb: |
no test coverage detected