mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
Update calls to anetPeerToString to include ip_len.
This commit is contained in:
parent
b39e827d22
commit
ee5a6df101
@ -2428,7 +2428,7 @@ sds genRedisInfoString(char *section) {
|
|||||||
int port;
|
int port;
|
||||||
long lag = 0;
|
long lag = 0;
|
||||||
|
|
||||||
if (anetPeerToString(slave->fd,ip,&port) == -1) continue;
|
if (anetPeerToString(slave->fd,ip,sizeof(ip),&port) == -1) continue;
|
||||||
switch(slave->replstate) {
|
switch(slave->replstate) {
|
||||||
case REDIS_REPL_WAIT_BGSAVE_START:
|
case REDIS_REPL_WAIT_BGSAVE_START:
|
||||||
case REDIS_REPL_WAIT_BGSAVE_END:
|
case REDIS_REPL_WAIT_BGSAVE_END:
|
||||||
|
@ -293,7 +293,7 @@ void replicationFeedMonitors(redisClient *c, list *monitors, int dictid, robj **
|
|||||||
int j, port;
|
int j, port;
|
||||||
sds cmdrepr = sdsnew("+");
|
sds cmdrepr = sdsnew("+");
|
||||||
robj *cmdobj;
|
robj *cmdobj;
|
||||||
char ip[32];
|
char ip[REDIS_IP_STR_LEN];
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
|
||||||
gettimeofday(&tv,NULL);
|
gettimeofday(&tv,NULL);
|
||||||
@ -303,7 +303,7 @@ void replicationFeedMonitors(redisClient *c, list *monitors, int dictid, robj **
|
|||||||
} else if (c->flags & REDIS_UNIX_SOCKET) {
|
} else if (c->flags & REDIS_UNIX_SOCKET) {
|
||||||
cmdrepr = sdscatprintf(cmdrepr,"[%d unix:%s] ",dictid,server.unixsocket);
|
cmdrepr = sdscatprintf(cmdrepr,"[%d unix:%s] ",dictid,server.unixsocket);
|
||||||
} else {
|
} else {
|
||||||
anetPeerToString(c->fd,ip,&port);
|
anetPeerToString(c->fd,ip,sizeof(ip),&port);
|
||||||
cmdrepr = sdscatprintf(cmdrepr,"[%d %s:%d] ",dictid,ip,port);
|
cmdrepr = sdscatprintf(cmdrepr,"[%d %s:%d] ",dictid,ip,port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user