]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_hep: hepv3_is_loaded() should check if we are enabled
authorSean Bright <sean.bright@gmail.com>
Fri, 15 Dec 2017 00:55:03 +0000 (19:55 -0500)
committerSean Bright <sean.bright@gmail.com>
Fri, 15 Dec 2017 00:55:28 +0000 (19:55 -0500)
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

res/res_hep.c

index f3b65ad2683c8a82c02628c1a204b21addd80408..3b953b7c15e13d230a4ee817c5fe2575a46e10c3 100644 (file)
@@ -423,7 +423,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)