incorrect handling of long (multi-packet) field?

Bug #1160058 reported by Wim Lewis on 2013-03-25
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle Client & Protocol Library
Andrew Hutchings

Bug Description

I'm not sure if this code is actually incorrect, or if it just looks wrong, but in near line 287 there's this code:


The intent, I think, is to cause libdrizzle to read the next packet header and then return to reading the current field, but the two 'push' operations are in the wrong order for that.

(Since the current state is presumably drizzle_state_field_read anyway, I think both the pop_state() and the push_state(drizzle_state_field_read) could be removed, leaving just the push_state(drizzle_state_packet_read) --- after which libdrizzle would return to what it's doing now, i.e., continuing to read the multi-packet field.)

Related branches

Changed in libdrizzle:
importance: Undecided → Medium
assignee: nobody → Andrew Hutchings (linuxjedi)
status: New → Triaged
milestone: none → 5.1.4
Andrew Hutchings (linuxjedi) wrote :

you are totally right, I think that is really old code. Good spot. Removing those worked perfectly and I believe gave us a nice small optimization too :)

Changed in libdrizzle:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers