mosquitto: an mqtt message broker

Return code unchecked during publish

Reported by Steven Lougheed on 2012-06-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mosquitto
Undecided
Unassigned

Bug Description

In _mosquitto_handle_publish (read_handle.c line 120), the return code from _mosquitto_read_bytes is not saved. The next line attempts to look at the return code and cleanup if the call fails, but this condition can never be met.

OLD:
_mosquitto_read_bytes(&mosq->in_packet, message->msg.payload, message->msg.payloadlen);
NEW
rc = _mosquitto_read_bytes(&mosq->in_packet, message->msg.payload, message->msg.payloadlen);

Roger Light (roger.light) wrote :

Thanks for the report, and well spotted. I've commited the change: https://bitbucket.org/oojah/mosquitto/changeset/42b40d98395a

Changed in mosquitto:
milestone: none → 0.16
status: New → Fix Committed
Changed in mosquitto:
milestone: 0.16 → 1.0
Changed in mosquitto:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers