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

Function dav_propdb_close

modules/dav/fs/dbm.c:510–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508}
509
510static void dav_propdb_close(dav_db *db)
511{
512
513 if (db->ns_table_dirty) {
514 dav_propdb_metadata m;
515 apr_datum_t key;
516 apr_datum_t value;
517 dav_error *err;
518
519 key.dptr = DAV_GDBM_NS_KEY;
520 key.dsize = DAV_GDBM_NS_KEY_LEN;
521
522 value.dptr = db->ns_table.buf;
523 value.dsize = db->ns_table.cur_len;
524
525 /* fill in the metadata that we store into the prop db. */
526 m.major = DAV_DBVSN_MAJOR;
527 m.minor = db->version; /* ### keep current minor version? */
528 m.ns_count = htons(db->ns_count);
529
530 memcpy(db->ns_table.buf, &m, sizeof(m));
531
532 err = dav_dbm_store(db, key, value);
533 if (err != NULL)
534 ap_log_error(APLOG_MARK, APLOG_WARNING, err->aprerr, ap_server_conf,
535 APLOGNO(00577) "Error writing propdb: %s", err->desc);
536 }
537
538 dav_dbm_close(db);
539}
540
541static dav_error * dav_propdb_define_namespaces(dav_db *db, dav_xmlns_info *xi)
542{

Callers

nothing calls this directly

Calls 3

dav_dbm_storeFunction · 0.85
dav_dbm_closeFunction · 0.85
ap_log_errorFunction · 0.50

Tested by

no test coverage detected