mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2025-07-02 14:04:22 +00:00
Fix find-by-hash function.
This commit is contained in:
parent
5b14823cb8
commit
004ba83752
1 changed files with 2 additions and 2 deletions
|
@ -271,9 +271,9 @@ namespace dindb {
|
|||
bool BackendRedis::search_file_by_hash (mchlib::FileRecordData& parItem, mchlib::SetRecordDataFull& parSet, const mchlib::TigerHash& parHash) {
|
||||
using boost::empty;
|
||||
|
||||
const std::string hash_key = "hash:" + tiger_to_string(parHash);
|
||||
const std::string hash_key = PROGRAM_NAME ":hash:" + tiger_to_string(parHash);
|
||||
redis::Reply hash_reply = m_redis.run("SRANDMEMBER", hash_key);
|
||||
if (redis::RedisVariantType_Integer == hash_reply.which() and not redis::get_integer(hash_reply)) {
|
||||
if (redis::RedisVariantType_Nil == hash_reply.which() or (redis::RedisVariantType_Integer == hash_reply.which() and not redis::get_integer(hash_reply))) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue