Fix issue with fr_cursor_remove
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 9 Jun 2015 05:13:34 +0000 (01:13 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 9 Jun 2015 05:14:14 +0000 (01:14 -0400)
commitdfee6bc88ac0fc186fab5e811c96aea98bf525d3
tree194b039321c37e8fd998184433e235619dfcaf01
parent2725e0971dd689da57bb515e8f91a97c5906299c
Fix issue with fr_cursor_remove

Caused unexpected behaviour removing attributes in an fr_cursor_next loop.

cursor->current would be advanced past the VP we were deleting. Which meant fr_cursor_next would skip past the next attribute.

Now we set current to be the vp before the one we're deleting, so fr_cursor_next works as expected.
src/lib/cursor.c