| 284 | } |
| 285 | |
| 286 | bool 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 | |
| 308 | bool RedisClient::ReWriteConfig() |
| 309 | { |
nothing calls this directly
no test coverage detected