From 90038906f44be7adef9ac656f24f2f32889e1975 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 8 Jul 2013 16:11:52 +0200 Subject: [PATCH] Fix old anetPeerToString() API call in replication.c --- src/redis.c | 2 -- src/replication.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/redis.c b/src/redis.c index e19fbf72..3b522bb1 100644 --- a/src/redis.c +++ b/src/redis.c @@ -2975,8 +2975,6 @@ int main(int argc, char **argv) { } if (server.ipfd_count > 0) redisLog(REDIS_NOTICE,"The server is now ready to accept connections on port %d", server.port); - if (server.ip6fd > 0) - redisLog(REDIS_NOTICE,"The server is now ready to accept IPv6 connections on port %d", server.port6); if (server.sofd > 0) redisLog(REDIS_NOTICE,"The server is now ready to accept connections at %s", server.unixsocket); } diff --git a/src/replication.c b/src/replication.c index 4343f619..4dce2cdc 100644 --- a/src/replication.c +++ b/src/replication.c @@ -1614,10 +1614,10 @@ void replicationCron(void) { if (slave->flags & REDIS_PRE_PSYNC_SLAVE) continue; if ((server.unixtime - slave->repl_ack_time) > server.repl_timeout) { - char ip[32]; + char ip[REDIS_IP_STR_LEN]; int port; - if (anetPeerToString(slave->fd,ip,&port) != -1) { + if (anetPeerToString(slave->fd,ip,sizeof(ip),&port) != -1) { redisLog(REDIS_WARNING, "Disconnecting timedout slave: %s:%d", ip, slave->slave_listening_port);