[Asterisk-code-review] app_chanisavail/cdr: ChanIsAvail sometimes fails to deactivate CDR. (asterisk[16])

Corey Farrell asteriskteam at digium.com
Wed Dec 11 16:57:22 CST 2019


Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/13310 )

Change subject: app_chanisavail/cdr: ChanIsAvail sometimes fails to deactivate CDR.
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.asterisk.org/c/asterisk/+/13310/2/apps/app_chanisavail.c 
File apps/app_chanisavail.c:

https://gerrit.asterisk.org/c/asterisk/+/13310/2/apps/app_chanisavail.c@31 
PS2, Line 31: <depend>func_cdr</depend>
> This is not a "true" dependance, since app_chanisavail can work without it. […]
It should be declared as an optional dependency at the bottom of the source (replace the AST_MODULE_INFO_STANDARD_EXTENDED):

AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Check channel availability",
	.load = load_module,
	.unload = unload_module,
	.support_level = AST_MODULE_SUPPORT_EXTENDED,
	.optional_modules = "func_cdr"
);

This way `func_cdr` cannot be unloaded if app_chanisavail is loaded.. This prevents the rare possibility of a race between checking for CDR_PROP existing and using it.  This suggestion is for 16/17/master only, in Asterisk 13 module loader did not protect against this.



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

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I1cbe09e8d2169c0962c1195133ff260d291f2074
Gerrit-Change-Number: 13310
Gerrit-PatchSet: 2
Gerrit-Owner: Frederic LE FOLL <frederic.lefoll at c-s.fr>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-CC: Corey Farrell <git at cfware.com>
Gerrit-Comment-Date: Wed, 11 Dec 2019 22:57:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Frederic LE FOLL <frederic.lefoll at c-s.fr>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191211/35e44f22/attachment.html>


More information about the asterisk-code-review mailing list