mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-29 16:44:29 +02:00
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;
|
auto *wait = new synchronousWait;
|
||||||
wait->ready = false;
|
wait->ready = false;
|
||||||
|
|
||||||
m_Rcon->ExecuteQuery(query, RedisQueryCallback, wait);
|
m_Rcon->ExecuteQuery(std::move(query), RedisQueryCallback, wait);
|
||||||
|
|
||||||
boost::mutex::scoped_lock lock(wait->mtx);
|
boost::mutex::scoped_lock lock(wait->mtx);
|
||||||
while (!wait->ready) {
|
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());
|
return std::shared_ptr<redisReply>(wait->reply, RedisReplyDeleter());
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ private:
|
|||||||
void ExceptionHandler(boost::exception_ptr exp);
|
void ExceptionHandler(boost::exception_ptr exp);
|
||||||
|
|
||||||
//Used to get a reply from the asyncronous connection
|
//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 void RedisQueryCallback(redisAsyncContext *c, void *r, void *p);
|
||||||
static redisReply* dupReplyObject(redisReply* reply);
|
static redisReply* dupReplyObject(redisReply* reply);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user