| 502 | } |
| 503 | |
| 504 | static dav_error *dav_really_open_db(dav_propdb *propdb, int ro) |
| 505 | { |
| 506 | dav_error *err; |
| 507 | |
| 508 | /* we're trying to open the db; turn off the 'deferred' flag */ |
| 509 | propdb->deferred = 0; |
| 510 | |
| 511 | /* ask the DB provider to open the thing */ |
| 512 | err = (*propdb->db_hooks->open)(propdb->p, propdb->resource, ro, |
| 513 | &propdb->db); |
| 514 | if (err != NULL) { |
| 515 | return dav_push_error(propdb->p, HTTP_INTERNAL_SERVER_ERROR, |
| 516 | DAV_ERR_PROP_OPENING, |
| 517 | "Could not open the property database.", |
| 518 | err); |
| 519 | } |
| 520 | |
| 521 | /* |
| 522 | ** NOTE: propdb->db could be NULL if we attempted to open a readonly |
| 523 | ** database that doesn't exist. If we require read/write |
| 524 | ** access, then a database was created and opened. |
| 525 | */ |
| 526 | |
| 527 | return NULL; |
| 528 | } |
| 529 | |
| 530 | DAV_DECLARE(dav_error *)dav_open_propdb(request_rec *r, dav_lockdb *lockdb, |
| 531 | const dav_resource *resource, |
no test coverage detected