[Asterisk-code-review] res hep: hepv3 is loaded() should check if we are enabled (asterisk[15])

Sean Bright asteriskteam at digium.com
Thu Dec 14 18:56:37 CST 2017


Sean Bright has uploaded this change for review. ( https://gerrit.asterisk.org/7594


Change subject: res_hep: hepv3_is_loaded() should check if we are enabled
......................................................................

res_hep: hepv3_is_loaded() should check if we are enabled

res_hep_pjsip.so and res_hep_rtcp.so will still load and do a lot of
unnecessary work even if 'enabled' is set to 'no' in hep.conf.

Change-Id: I3eddfeea09c6b5bc7c641952ee0ae487fd09b64b
---
M res/res_hep.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/94/7594/1

diff --git a/res/res_hep.c b/res/res_hep.c
index 25b4d13..ba036d7 100644
--- a/res/res_hep.c
+++ b/res/res_hep.c
@@ -421,7 +421,7 @@
 {
 	RAII_VAR(struct module_config *, config, ao2_global_obj_ref(global_config), ao2_cleanup);
 
-	return (config != NULL) ? 1 : 0;
+	return config && config->general->enabled;
 }
 
 struct hepv3_capture_info *hepv3_create_capture_info(const void *payload, size_t len)

-- 
To view, visit https://gerrit.asterisk.org/7594
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3eddfeea09c6b5bc7c641952ee0ae487fd09b64b
Gerrit-Change-Number: 7594
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171214/9c4afe8c/attachment-0001.html>


More information about the asterisk-code-review mailing list