Module: sip-router
Branch: master
Commit: 2bb07b9d2df567e24f86b291bee7748db104252b
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2bb07b9…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sun May 12 13:54:59 2013 +0100
modules/outbound: added warning message when outbound module is loaded in a configuraiton
that does not load the stun module
---
modules/outbound/ob_mod.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/modules/outbound/ob_mod.c b/modules/outbound/ob_mod.c
index a2b6d12..6180ec2 100644
--- a/modules/outbound/ob_mod.c
+++ b/modules/outbound/ob_mod.c
@@ -107,12 +107,21 @@ static int mod_init(void)
LM_ERR("unable to get %d cryptographically strong pseudo-"
"random bytes\n", ob_key.len);
}
+
if (cfg_declare("outbound", outbound_cfg_def, &default_outbound_cfg,
- cfg_sizeof(outbound), &outbound_cfg)) {
+ cfg_sizeof(outbound), &outbound_cfg))
+ {
LM_ERR("declaring config framework variable\n");
return -1;
}
default_outbound_cfg.outbound_active = 1;
+
+ if (!module_loaded("stun"))
+ {
+ LM_WARN("\"stun\" module is not loaded. STUN is required to use"
+ " outbound with UDP.\n");
+ }
+
return 0;
}