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

Sean Bright asteriskteam at digium.com
Thu Mar 23 09:36:23 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: Code-Review-1

(3 comments)

File include/asterisk/calendar.h:

https://gerrit.asterisk.org/c/asterisk/+/20024/comment/ff1e3462_c27bc706 
PS3, Line 207:  * \param The busy_state value to obtain a string for.
This is not the correct doxygen syntax. You need to include the parameter name (see `ast_calendar_merge_events` for an example).


https://gerrit.asterisk.org/c/asterisk/+/20024/comment/75126698_d36bbed4 
PS3, Line 209: , or NULL if the input
             :  *   value isn't one of the pre-defined values
This will need to be updated assuming you make the change I suggested to the implementation.


File res/res_calendar.c:

https://gerrit.asterisk.org/c/asterisk/+/20024/comment/bdd550ab_e1370b45 
PS2, Line 369: default:
             : 		return NULL;
> Elsewhere in the code BUSYSTATE comes from what I would consider an "untrusted source" and is processed with atol(), so what if BUSYSTATE:-1 or BUSYSTATE:3 comes our way?  What if the specification (unlikely) gets expanded?

Then just return "Unknown (Busy)" directly instead of making the calling code responsible for it.



-- 
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 14:36:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
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/f73087b3/attachment-0001.html>


More information about the asterisk-code-review mailing list