Lines Matching refs:key
70 ** char[] key]
71 ** The key is to the collection lock that resulted in this indirect lock
135 * inherited from. A lock provider may also define a key to the
136 * inherited lock, for fast datbase lookup. The key is opaque outside
142 apr_datum_t key;
163 + sizeof((a)->key.dsize) + (a)->key.dsize)
200 apr_datum_t key; /* key into the lock database */
216 static dav_lock *dav_fs_alloc_lock(dav_lockdb *lockdb, apr_datum_t key,
224 comb->priv.key = key;
377 ** dav_fs_build_key: Given a resource, return a apr_datum_t key
384 apr_datum_t key;
390 key.dsize = strlen(pathname) + 2;
391 key.dptr = apr_palloc(p, key.dsize);
392 *key.dptr = DAV_TYPE_FNAME;
393 memcpy(key.dptr + 1, pathname, key.dsize - 1);
394 if (key.dptr[key.dsize - 2] == '/')
395 key.dptr[--key.dsize - 1] = '\0';
396 return key;
412 ** If direct and indirect == NULL, the key is removed.
414 static dav_error * dav_fs_save_lock_record(dav_lockdb *lockdb, apr_datum_t key,
439 /* If nothing to save, delete key */
441 /* don't fail if the key is not present */
443 (void) dav_dbm_delete(lockdb->info->db, key);
492 memcpy(ptr, &ip->key.dsize, sizeof(ip->key.dsize)); /* Size of key */
493 ptr += sizeof(ip->key.dsize);
494 memcpy(ptr, ip->key.dptr, ip->key.dsize); /* Key data */
495 ptr += ip->key.dsize;
499 if ((err = dav_dbm_store(lockdb->info->db, key, val)) != NULL) {
512 ** dav_load_lock_record: Reads lock information about key from lock db;
521 static dav_error * dav_fs_load_lock_record(dav_lockdb *lockdb, apr_datum_t key,
552 if ((err = dav_dbm_fetch(lockdb->info->db, key, &val)) != NULL)
592 if (*key.dptr == DAV_TYPE_FNAME) {
593 const char *fname = key.dptr + 1;
617 memcpy(&ip->key.dsize, val.dptr + offset, sizeof(ip->key.dsize)); /* length of datum */
618 offset += sizeof(ip->key.dsize);
619 ip->key.dptr = apr_pmemdup(p, val.dptr + offset, ip->key.dsize);
620 offset += ip->key.dsize;
657 return dav_fs_save_lock_record(lockdb, key, *direct, *indirect);
674 if ((err = dav_fs_load_lock_record(lockdb, indirect->key,
978 apr_datum_t key;
980 key = dav_fs_build_key(lockdb->info->pool, resource);
983 key,
997 apr_datum_t key;
1013 key = dav_fs_build_key(p, resource);
1014 if ((err = dav_fs_load_lock_record(lockdb, key, DAV_CREATE_LIST,
1022 newlock = dav_fs_alloc_lock(lockdb, key, dp->locktoken);
1038 newlock = dav_fs_alloc_lock(lockdb, ip->key, ip->locktoken);
1075 apr_datum_t key;
1081 key = dav_fs_build_key(lockdb->info->pool, resource);
1082 if ((err = dav_fs_load_lock_record(lockdb, key, DAV_CREATE_LIST,
1090 *lock = dav_fs_alloc_lock(lockdb, key, locktoken);
1104 *lock = dav_fs_alloc_lock(lockdb, ip->key, locktoken);
1137 apr_datum_t key;
1153 key = dav_fs_build_key(lockdb->info->pool, resource);
1155 *locks_present = dav_dbm_exists(lockdb->info->db, key);
1169 apr_datum_t key;
1171 key = dav_fs_build_key(lockdb->info->pool, resource);
1172 if ((err = dav_fs_load_lock_record(lockdb, key, 0, &dp, &ip)) != NULL) {
1191 newi->key = lock->info->key;
1221 newi->key = lock->info->key;
1228 if ((err = dav_fs_save_lock_record(lockdb, key, dp, ip)) != NULL) {
1252 apr_datum_t key;
1254 key = dav_fs_build_key(lockdb->info->pool, resource);
1262 if ((err = dav_fs_load_lock_record(lockdb, key, DAV_CREATE_LIST,
1291 if ((err = dav_fs_save_lock_record(lockdb, key, dh, ih)) != NULL) {
1342 apr_datum_t key;
1351 key = dav_fs_build_key(lockdb->info->pool, resource);
1352 if ((err = dav_fs_load_lock_record(lockdb, key, DAV_CREATE_LIST,
1364 newlock = dav_fs_alloc_lock(lockdb, key, dp_scan->locktoken);
1382 && (err = dav_fs_save_lock_record(lockdb, key, dp, ip)) != NULL) {
1399 newlock = dav_fs_alloc_lock(lockdb, ip->key, dp_scan->locktoken);
1412 if ((err = dav_fs_save_lock_record(lockdb, ip->key, ref_dp,