[Asterisk-code-review] res_calendar: output busy state as part of show calendar. (asterisk[master])

Sean Bright asteriskteam at digium.com
Thu Mar 23 10:02:59 CDT 2023


Attention is currently required from: Jaco Kroon.

Sean Bright has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/20024 )

Change subject: res_calendar: output busy state as part of show calendar.
......................................................................


Patch Set 3:

(3 comments)

File include/asterisk/calendar.h:

https://gerrit.asterisk.org/c/asterisk/+/20024/comment/75b9ce09_bfeb7579 
PS3, Line 205: /*! \brief Convert a free-busy state integer value to a string.
             :  *
             :  * \param The busy_state value to obtain a string for.
             :  *
             :  * \return A human readable string describing the state, or NULL if the input
             :  *   value isn't one of the pre-defined values.
             :  */
             : const char *ast_calendar_busy_state_to_str(enum ast_calendar_busy_state busy_state);
Remove this entirely. This does not need to be API.


File res/res_calendar.c:

https://gerrit.asterisk.org/c/asterisk/+/20024/comment/986ea08a_861e28a0 
PS2, Line 369: default:
             : 		return NULL;
> I contemplated this, and decided against that since if *other* future users use the function I'd pre […]
I would prefer to not cater to invalid state. If it was my choice I would ensure that the busy state was sanitized on its way into Asterisk and then make this an ast_assert.

That being said I don't care all that much any longer since we are making this a static function, so you are free to do what you like here.


File res/res_calendar.c:

https://gerrit.asterisk.org/c/asterisk/+/20024/comment/00e0718c_a98f55f4 
PS3, Line 360: const char *ast_calendar_busy_state_to_str(enum ast_calendar_busy_state busy_state)
This doesn't need to be API, so make it static.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/20024
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I894e4ecc3e93db4ff7783d46266ba3c5e6ccda10
Gerrit-Change-Number: 20024
Gerrit-PatchSet: 3
Gerrit-Owner: Jaco Kroon <jaco at uls.co.za>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Sean Bright <sean at seanbright.com>
Gerrit-Attention: Jaco Kroon <jaco at uls.co.za>
Gerrit-Comment-Date: Thu, 23 Mar 2023 15:02:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Sean Bright <sean at seanbright.com>
Comment-In-Reply-To: Jaco Kroon <jaco at uls.co.za>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230323/028ea418/attachment.html>


More information about the asterisk-code-review mailing list