MCPcopy Create free account
hub / github.com/cinience/RedisStudio / SetConfig

Method SetConfig

RedisStudio/Redis/RedisClient.cpp:286–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286bool RedisClient::SetConfig(const TDicConfig& dicConfig)
287{
288 TDicConfig::const_iterator it = dicConfig.begin();
289 TDicConfig::const_iterator itend = dicConfig.end();
290
291 for (; it!=itend; ++it)
292 {
293 std::string key = it->first;
294 std::string val = it->second;
295 redisReply* reply = Command("CONFIG SET %s %s", key.c_str(), val.c_str());
296 if (!reply) return false;
297 if (reply->type != REDIS_REPLY_STATUS)
298 {
299 freeReplyObject(reply);
300 return false;
301 }
302 freeReplyObject(reply);
303 }
304
305 return true;
306}
307
308bool RedisClient::ReWriteConfig()
309{

Callers

nothing calls this directly

Calls 1

freeReplyObjectFunction · 0.85

Tested by

no test coverage detected