summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2013-07-08 16:11:52 +0200
committerantirez <antirez@gmail.com>2013-07-08 16:11:52 +0200
commit90038906f44be7adef9ac656f24f2f32889e1975 (patch)
treea7b33fc45682a29dbb89f338b12a3019fe716893
parentc76df730109f770793403cd9fb9b68b945c210f6 (diff)
downloadredis-90038906f44be7adef9ac656f24f2f32889e1975.tar.gz
Fix old anetPeerToString() API call in replication.c
-rw-r--r--src/redis.c2
-rw-r--r--src/replication.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/redis.c b/src/redis.c
index e19fbf727..3b522bb10 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 4343f6193..4dce2cdcb 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);