1
0
Fork 0
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:
King_DuckZ 2016-07-08 21:32:09 +01:00
parent 5b14823cb8
commit 004ba83752

View file

@ -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 {