[asterisk-dev] [Code Review] data api gsoc2009

Tilghman Lesher tlesher at digium.com
Mon Jul 13 15:49:16 CDT 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/275/#review967
-----------------------------------------------------------



/trunk/apps/app_queue.c
<https://reviewboard.asterisk.org/r/275/#comment2316>

    ast_debug()



/trunk/apps/app_queue.c
<https://reviewboard.asterisk.org/r/275/#comment2318>

    You should be unreffing member, not the queue here.



/trunk/apps/app_queue.c
<https://reviewboard.asterisk.org/r/275/#comment2319>

    Unref member here, too



/trunk/apps/app_queue.c
<https://reviewboard.asterisk.org/r/275/#comment2321>

    Is there really any case when you're NOT unregistering every provider within a module/file?



/trunk/main/data.c
<https://reviewboard.asterisk.org/r/275/#comment2322>

    Nitpick: switch and case should be at the same indentation level.



/trunk/main/data.c
<https://reviewboard.asterisk.org/r/275/#comment2324>

    Similarly, this function calls returns a volatile pointer.



/trunk/main/data.c
<https://reviewboard.asterisk.org/r/275/#comment2323>

    When this function returns, it passes back a pointer to the now freed stack.  This pointer is extremely volatile and could be stomped on with the next use of the stack (either another function call or an alloca()) within the calling function.  A safer way to do this would be to ast_strdup() the pointer and pass the malloc'ed pointer back.  Or you could pass a buffer (and its size) into the function.


- Tilghman


On 2009-07-13 12:44:57, Eliel Sardañons wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/275/
> -----------------------------------------------------------
> 
> (Updated 2009-07-13 12:44:57)
> 
> 
> Review request for Asterisk Developers, Russell Bryant and Tilghman Lesher.
> 
> 
> Summary
> -------
> 
> This is the first review request for the Data API GSoC 2009 project.
> An architectural review is requested.
> 
> 
> Diffs
> -----
> 
>   /trunk/apps/app_queue.c 206212 
>   /trunk/include/asterisk/_private.h 206212 
>   /trunk/include/asterisk/data.h PRE-CREATION 
>   /trunk/include/asterisk/xml.h 206212 
>   /trunk/main/asterisk.c 206212 
>   /trunk/main/data.c PRE-CREATION 
>   /trunk/main/xml.c 206212 
>   /trunk/tests/test_data.c PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/275/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Eliel
> 
>




More information about the asterisk-dev mailing list