From: Sean Bright Date: Fri, 15 Dec 2017 00:55:03 +0000 (-0500) Subject: res_hep: hepv3_is_loaded() should check if we are enabled X-Git-Tag: 15.2.0-rc1~32^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1ae46df1ef97a3f1e77849da5d4bdfba408b88f4;p=thirdparty%2Fasterisk.git 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 --- diff --git a/res/res_hep.c b/res/res_hep.c index 25b4d13b1e..ba036d70f6 100644 --- a/res/res_hep.c +++ b/res/res_hep.c @@ -421,7 +421,7 @@ int hepv3_is_loaded(void) { 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)