- Timestamp:
- Apr 7, 2009, 1:48:25 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/neb_distrib_20081210/Nebulous-Server/lib/Nebulous/Server.pm
r23718 r23725 79 79 # only use the first 8 hex chars... have to be careful to avoid an int 80 80 # overflow here 81 # XXX this needs to be modified to follow my key prescription: 82 # neb://host/path/path/filename.ext -> use path/path/filename (ignore neb://host and .ext)83 # EAM : test to double-check hashing behavior84 $db_index = unpack("h8", sha1_hex( "$key")) % $config->n_db;81 82 # hash only the directory component of the path and not the filename 83 my $path = dirname($key->path); 84 $db_index = unpack("h8", sha1_hex($path)) % $config->n_db; 85 85 86 86 return $db_index;
Note:
See TracChangeset
for help on using the changeset viewer.
