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

MQTT::Client::sendPacket send loop uses wrong length #19

Closed
jpwsutton opened this issue Feb 4, 2016 · 0 comments
Closed

MQTT::Client::sendPacket send loop uses wrong length #19

jpwsutton opened this issue Feb 4, 2016 · 0 comments

Comments

@jpwsutton
Copy link
Member

migrated from Bugzilla #460389
status RESOLVED severity normal in component MQTT-Embedded-C for 1.1
Reported in version unspecified on platform Other
Assigned to: Ian Craggs

On 2015-02-19 18:15:55 -0500, Joe Planisky wrote:

MQTT::Client::sendPacket uses a 'while' loop to ensure all data in sendBuf is sent. However, in the call to 'ipstack.write', the length parameter is never updated to account for data already sent.

This line:

    rc = ipstack.write(&sendbuf[sent], length, timer.left_ms());

should be:

    rc = ipstack.write(&sendbuf[sent], length-sent, timer.left_ms());

On 2015-02-20 06:12:09 -0500, Ian Craggs wrote:

Thanks Joe. Fixed in master branch.

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

No branches or pull requests

1 participant