mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
Cluster: fixed a bug in clusterSendPublish() due to inverted statements.
The code used to copy the header *after* the 'hdr' pointer was already switched to the new buffer. Of course we need to do the reverse.
This commit is contained in:
parent
e9d97b453e
commit
f6efb6cdec
@ -1380,8 +1380,8 @@ void clusterSendPublish(clusterLink *link, robj *channel, robj *message) {
|
||||
payload = buf;
|
||||
} else {
|
||||
payload = zmalloc(totlen);
|
||||
hdr = (clusterMsg*) payload;
|
||||
memcpy(payload,hdr,sizeof(*hdr));
|
||||
hdr = (clusterMsg*) payload;
|
||||
}
|
||||
memcpy(hdr->data.publish.msg.bulk_data,channel->ptr,sdslen(channel->ptr));
|
||||
memcpy(hdr->data.publish.msg.bulk_data+sdslen(channel->ptr),
|
||||
|
Loading…
Reference in New Issue
Block a user