Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug for msg->mlen #462

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix a bug for msg->mlen #462

wants to merge 1 commit into from

Conversation

deep011
Copy link
Contributor

@deep011 deep011 commented Mar 22, 2016

Function msg_append() already added the dst->mlen.

Function msg_append() already added the dst->mlen.
@CLAassistant
Copy link

CLAassistant commented Jul 29, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@TysonAndre
Copy link
Collaborator

This pr seems to be correct, function msg_append() already added the dst->mlen.

A message (dst) is made up of 1 or more mbufs, and the bytes is the length of the msg, which is the sum of the length of the mbufs. msg_append/mbuf_insert add individual mbufs from the source to the destination.

As for how twemproxy is currently working despite that, I expect it's because mlen isn't used and that the code that generates redis responses acts on the mbuf list - the length might only be used for logging

Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants