mirror of https://github.com/Icinga/icinga2.git
parent
fb98d3edef
commit
53d04cc4e8
|
@ -408,11 +408,11 @@ struct RedisReplyDeleter
|
|||
}
|
||||
};
|
||||
|
||||
std::shared_ptr<redisReply> RedisWriter::RedisGet(const std::vector<String>& query) {
|
||||
std::shared_ptr<redisReply> RedisWriter::RedisGet(std::vector<String> query) {
|
||||
auto *wait = new synchronousWait;
|
||||
wait->ready = false;
|
||||
|
||||
m_Rcon->ExecuteQuery(query, RedisQueryCallback, wait);
|
||||
m_Rcon->ExecuteQuery(std::move(query), RedisQueryCallback, wait);
|
||||
|
||||
boost::mutex::scoped_lock lock(wait->mtx);
|
||||
while (!wait->ready) {
|
||||
|
@ -422,4 +422,4 @@ std::shared_ptr<redisReply> RedisWriter::RedisGet(const std::vector<String>& que
|
|||
}
|
||||
|
||||
return std::shared_ptr<redisReply>(wait->reply, RedisReplyDeleter());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ private:
|
|||
void ExceptionHandler(boost::exception_ptr exp);
|
||||
|
||||
//Used to get a reply from the asyncronous connection
|
||||
std::shared_ptr<redisReply> RedisGet(const std::vector<String>& query);
|
||||
std::shared_ptr<redisReply> RedisGet(std::vector<String> query);
|
||||
static void RedisQueryCallback(redisAsyncContext *c, void *r, void *p);
|
||||
static redisReply* dupReplyObject(redisReply* reply);
|
||||
|
||||
|
|
Loading…
Reference in New Issue