X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/9b43b1ef4d646922fc904fda61ff5ab67a2581db..cc017c58398480b0b1976a58463954b4bfc084a4:/src/replication.c?ds=sidebyside diff --git a/src/replication.c b/src/replication.c index 5c5bc9ab..222032cf 100644 --- a/src/replication.c +++ b/src/replication.c @@ -3,6 +3,7 @@ #include #include #include +#include #include /* ---------------------------------- MASTER -------------------------------- */ @@ -53,10 +54,12 @@ void replicationFeedMonitors(redisClient *c, list *monitors, int dictid, robj ** gettimeofday(&tv,NULL); cmdrepr = sdscatprintf(cmdrepr,"%ld.%06ld ",(long)tv.tv_sec,(long)tv.tv_usec); if (c->flags & REDIS_LUA_CLIENT) { - cmdrepr = sdscatprintf(cmdrepr,"[%d lua] ", dictid); + cmdrepr = sdscatprintf(cmdrepr,"[%d lua] ",dictid); + } else if (c->flags & REDIS_UNIX_SOCKET) { + cmdrepr = sdscatprintf(cmdrepr,"[%d unix:%s] ",dictid,server.unixsocket); } else { anetPeerToString(c->fd,ip,&port); - cmdrepr = sdscatprintf(cmdrepr,"[%d %s:%d] ", dictid,ip,port); + cmdrepr = sdscatprintf(cmdrepr,"[%d %s:%d] ",dictid,ip,port); } for (j = 0; j < argc; j++) { @@ -145,6 +148,46 @@ void syncCommand(redisClient *c) { return; } +/* REPLCONF