[asterisk-dev] [Code Review]: Add result variable to make it possible to know that a CALENDAR_WRITE has failed.
Terry Wilson
reviewboard at asterisk.org
Thu Jan 26 07:41:36 CST 2012
> On Jan. 26, 2012, 12:04 a.m., junky wrote:
> > Just for tracability: https://issues.asterisk.org/jira/browse/ASTERISK-16903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> >
> > why did you move write_cleanup: ?
> > if you cant allocate memory, you'll try to allocate again (which will probably fails too) when calling pbx_builtin_setvar_helper(chan, "CALENDARSTATUS" 0/1.
>
> Terry Wilson wrote:
> I moved write_cleanup because memory allocations would result in CALENDAR_SUCCESS not being set at all. I don't see anywhere where there is another attempted allocation, but I do use those allocations. I need to move the ret = ... and ast_log lines above the write_cleanup, but keep the setvars under it. Also, the bug is linked above under Bugs: :-)
>
> Terry Wilson wrote:
> Er, memory allocation failures would result in the variable not being set, and I attempt to use possibly-failed allocations.
Er, I actually mean any error would cause the variable to not be set. I don't function well in the morning.
- Terry
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1692/#review5298
-----------------------------------------------------------
On Jan. 26, 2012, 7:33 a.m., Terry Wilson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1692/
> -----------------------------------------------------------
>
> (Updated Jan. 26, 2012, 7:33 a.m.)
>
>
> Review request for Asterisk Developers and junky.
>
>
> Summary
> -------
>
> This patch adds a CALENDAR_SUCCESS=1/0 variable that is set to show whether or not CALENDAR_WRITE has passed. This patch is basically junky's patch from the issue with CALENDAR_SUCCESS=1/0 instead of CALENDARSTATUS="SUCCESS"/"FAILURE" so that one can just do GotoIf(${CALENDAR_SUCCESS}?success:failure). Also changed is adding some debugging for caldav PUT responses and not treating responses with no body as an error (as a PUT gets a 201 Created with no body).
>
>
> This addresses bug ASTERISK-16903.
> https://issues.asterisk.org/jira/browse/ASTERISK-16903
>
>
> Diffs
> -----
>
> /trunk/res/res_calendar.c 352510
> /trunk/res/res_calendar_caldav.c 352510
> /trunk/res/res_calendar_exchange.c 352510
>
> Diff: https://reviewboard.asterisk.org/r/1692/diff
>
>
> Testing
> -------
>
> Wrote to a caldav calendar and verified proper creation of event and CALENDAR_SUCCESS values.
>
>
> Thanks,
>
> Terry
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120126/67f73414/attachment.htm>
More information about the asterisk-dev
mailing list