[asterisk-dev] [Code Review] fopen(REF_FILE) fails to check for success

rmudgett reviewboard at asterisk.org
Mon Oct 24 16:15:00 CDT 2011


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



/trunk/main/astobj2.c
<https://reviewboard.asterisk.org/r/1539/#comment8744>

    Should fix the spacing around operators to match guidelines since you are adjusting this line.



/trunk/main/astobj2.c
<https://reviewboard.asterisk.org/r/1539/#comment8742>

    You might as well fix the indention while you are here.



/trunk/main/astobj2.c
<https://reviewboard.asterisk.org/r/1539/#comment8743>

    Should refo be checked for NULL here?


- rmudgett


On Oct. 24, 2011, 3:35 p.m., wdoekes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1539/
> -----------------------------------------------------------
> 
> (Updated Oct. 24, 2011, 3:35 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> I sometimes switch between running asterisk as user and root. When refcounting is enabled, asterisk crashes when trying to fprintf to a NULL FILE* when it cannot fopen /tmp/refs.
> 
> I didn't go for fancy error checking and warnings: just checking for writability is fine for my purposes. The refcounting user should be smart enough to check for file permissions when the file stays empty.
> 
> (Second diff removes a red blob.)
> 
> 
> Diffs
> -----
> 
>   /trunk/main/astobj2.c 342060 
> 
> Diff: https://reviewboard.asterisk.org/r/1539/diff
> 
> 
> Testing
> -------
> 
> It works.
> 
> 
> Thanks,
> 
> wdoekes
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20111024/35f4fb85/attachment-0001.htm>


More information about the asterisk-dev mailing list