X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/e54fe9a79f71e97a5beb76dee346c8c0606b02be..d2f83d4a764fc155dbe07f5badecd9b65af699a5:/src/cluster.c diff --git a/src/cluster.c b/src/cluster.c index 07552c18..57243132 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -210,7 +210,7 @@ void clusterInit(void) { exit(1); } if (aeCreateFileEvent(server.el, server.cfd, AE_READABLE, - clusterAcceptHandler, NULL) == AE_ERR) oom("creating file event"); + clusterAcceptHandler, NULL) == AE_ERR) redisPanic("Unrecoverable error creating Redis Cluster file event."); server.cluster.slots_to_keys = zslCreate(); } @@ -902,7 +902,7 @@ void clusterSendPublish(clusterLink *link, robj *channel, robj *message) { } else { payload = zmalloc(totlen); hdr = (clusterMsg*) payload; - memcpy(payload,hdr,sizeof(hdr)); + memcpy(payload,hdr,sizeof(*hdr)); } memcpy(hdr->data.publish.msg.bulk_data,channel->ptr,sdslen(channel->ptr)); memcpy(hdr->data.publish.msg.bulk_data+sdslen(channel->ptr),