[asterisk-dev] [Code Review] Fix ao2_callback when both OBJ_MULTIPLE and OBJ_NODATA are passed
Kevin Fleming
kpfleming at digium.com
Mon Jan 11 10:19:43 CST 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/457/#review1350
-----------------------------------------------------------
Ship it!
Agreed. Nice usage of the macro to document what is really going on here.
- Kevin
On 2010-01-11 09:57:57, Sean Bright wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/457/
> -----------------------------------------------------------
>
> (Updated 2010-01-11 09:57:57)
>
>
> Review request for Asterisk Developers and Kevin Fleming.
>
>
> Summary
> -------
>
> There is an issue which only affects trunk and the new ao2_callback OBJ_MULTIPLE
> implementation. When both OBJ_MULTIPLE and OBJ_NODATA are passed, only the first
> object is visited, regardless of what is returned by the specified callback. This
> causes a problem when we are clearing a container, i.e.:
>
> ao2_callback(container, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL);
>
> Only unlinks the first object. The attached patch attempts to resolve this.
>
>
> This addresses bug 16564.
> https://issues.asterisk.org/view.php?id=16564
>
>
> Diffs
> -----
>
> /trunk/main/astobj2.c 239110
>
> Diff: https://reviewboard.asterisk.org/r/457/diff
>
>
> Testing
> -------
>
> The reporter of issue 16564, pj, has reported that this patch resolves the errors
> he was seeing. I have also tested and confirmed the warnings/errors no longer
> occur.
>
>
> Thanks,
>
> Sean
>
>
More information about the asterisk-dev
mailing list