Lines Matching refs:key
71 * char[] key]
72 * The key is to the collection lock that resulted in this indirect lock
124 * inherited from. A lock provider may also define a key to the
125 * inherited lock, for fast datbase lookup. The key is opaque outside
131 apr_datum_t key;
152 + sizeof(int) + (a)->key.dsize)
190 apr_datum_t key; /* key into the lock database */
231 static dav_lock *dav_generic_alloc_lock(dav_lockdb *lockdb, apr_datum_t key,
239 comb->priv.key = key;
397 * Given a pathname, build a DAV_TYPE_FNAME lock database key.
402 apr_datum_t key;
409 key.dsize = strlen(pathname) + 2;
410 key.dptr = apr_palloc(p, key.dsize);
411 *key.dptr = DAV_TYPE_FNAME;
412 memcpy(key.dptr + 1, pathname, key.dsize - 1);
413 if (key.dptr[key.dsize - 2] == '/')
414 key.dptr[--key.dsize - 1] = '\0';
415 return key;
431 * If direct and indirect == NULL, the key is removed.
434 apr_datum_t key,
460 /* If nothing to save, delete key */
462 /* don't fail if the key is not present */
464 apr_dbm_delete(lockdb->info->db, key);
518 memcpy(ptr, &ip->key.dsize, sizeof(ip->key.dsize));
519 ptr += sizeof(ip->key.dsize);
521 memcpy(ptr, ip->key.dptr, ip->key.dsize);
522 ptr += ip->key.dsize;
527 if ((status = apr_dbm_store(lockdb->info->db, key, val)) != APR_SUCCESS) {
542 * dav_load_lock_record: Reads lock information about key from lock db;
552 apr_datum_t key,
584 if ((status = apr_dbm_fetch(lockdb->info->db, key, &val)) != APR_SUCCESS) {
644 ip->key.dsize = *((int *) (val.dptr + offset));
645 offset += sizeof(ip->key.dsize);
646 ip->key.dptr = apr_pmemdup(p, val.dptr + offset, ip->key.dsize);
647 offset += ip->key.dsize;
683 return dav_generic_save_lock_record(lockdb, key, *direct, *indirect);
700 if ((err = dav_generic_load_lock_record(lockdb, indirect->key,
772 apr_datum_t key;
774 key = dav_generic_build_key(lockdb->info->pool, resource);
776 *lock = dav_generic_alloc_lock(lockdb, key, NULL);
789 apr_datum_t key;
805 key = dav_generic_build_key(p, resource);
806 if ((err = dav_generic_load_lock_record(lockdb, key, DAV_CREATE_LIST,
814 newlock = dav_generic_alloc_lock(lockdb, key, dp->locktoken);
830 newlock = dav_generic_alloc_lock(lockdb, ip->key, ip->locktoken);
868 apr_datum_t key;
874 key = dav_generic_build_key(lockdb->info->pool, resource);
875 if ((err = dav_generic_load_lock_record(lockdb, key, DAV_CREATE_LIST,
883 *lock = dav_generic_alloc_lock(lockdb, key, locktoken);
897 *lock = dav_generic_alloc_lock(lockdb, ip->key, locktoken);
930 apr_datum_t key;
946 key = dav_generic_build_key(lockdb->info->pool, resource);
948 *locks_present = apr_dbm_exists(lockdb->info->db, key);
962 apr_datum_t key;
964 key = dav_generic_build_key(lockdb->info->pool, resource);
966 err = dav_generic_load_lock_record(lockdb, key, 0, &dp, &ip);
986 newi->key = lock->info->key;
1016 newi->key = lock->info->key;
1023 if ((err = dav_generic_save_lock_record(lockdb, key, dp, ip)) != NULL) {
1038 apr_datum_t key;
1040 key = dav_generic_build_key(lockdb->info->pool, resource);
1048 if ((err = dav_generic_load_lock_record(lockdb, key, DAV_CREATE_LIST,
1077 if ((err = dav_generic_save_lock_record(lockdb, key, dh, ih)) != NULL) {
1110 apr_datum_t key;
1119 key = dav_generic_build_key(lockdb->info->pool, resource);
1120 if ((err = dav_generic_load_lock_record(lockdb, key, DAV_CREATE_LIST,
1132 newlock = dav_generic_alloc_lock(lockdb, key, dp_scan->locktoken);
1150 && (err = dav_generic_save_lock_record(lockdb, key, dp, ip)) != NULL) {
1167 newlock = dav_generic_alloc_lock(lockdb, ip->key, dp->locktoken);
1180 if ((err = dav_generic_save_lock_record(lockdb, ip->key, ref_dp,