提交 b3b9464b 编写于 作者: Z zeliard 提交者: Alexis Campailla

Fix pointer casting for supporting a 64bit case

上级 f6a21370
......@@ -160,7 +160,7 @@ void feedReplicationBacklogWithObject(robj *o) {
size_t len;
if (o->encoding == REDIS_ENCODING_INT) {
len = ll2string(llstr,sizeof(llstr),(long)o->ptr);
len = ll2string(llstr,sizeof(llstr),(long long)o->ptr);
p = llstr;
} else {
len = sdslen(o->ptr);
......@@ -1990,7 +1990,7 @@ void replicationCron(void) {
}
/* Timed out master when we are an already connected slave? */
if (server.masterhost && server.repl_state == REDIS_REPL_CONNECTED &&
if (server.masterhost && server.repl_state == REDIS_REPL_CONNECTED &&
(time(NULL)-server.master->lastinteraction) > server.repl_timeout)
{
redisLog(REDIS_WARNING,"MASTER timeout: no data nor PING received...");
......
......@@ -2124,7 +2124,7 @@ void sentinelRefreshInstanceInfo(sentinelRedisInstance *ri, const char *info) {
if ((ri->flags & SRI_SLAVE) &&
role == SRI_SLAVE &&
(ri->slave_master_port != ri->master->addr->port ||
strcasecmp(ri->slave_master_host,ri->master->addr->ip)))
strcasecmp(ri->slave_master_host, ri->master->addr->ip)))
{
mstime_t wait_time = ri->master->failover_timeout;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册