[sr-dev] git:master: modules/websocket: Improved module_loaded() check for nathelper and outbound so it only fires when the SIP subprotocol is enabled

Peter Dunkley peter.dunkley at crocodile-rcs.com
Mon May 20 00:56:50 CEST 2013


Module: sip-router
Branch: master
Commit: f0ae598a3e63e62d12a143c6cd42b698ad1f2eed
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f0ae598a3e63e62d12a143c6cd42b698ad1f2eed

Author: Peter Dunkley <peter.dunkley at crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley at crocodile-rcs.com>
Date:   Sun May 19 23:56:06 2013 +0100

modules/websocket: Improved module_loaded() check for nathelper and outbound so it only fires when the SIP subprotocol is enabled

---

 modules/websocket/ws_mod.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/websocket/ws_mod.c b/modules/websocket/ws_mod.c
index ea1e23a..ec5e07c 100644
--- a/modules/websocket/ws_mod.c
+++ b/modules/websocket/ws_mod.c
@@ -278,7 +278,9 @@ static int mod_init(void)
 		return -1;
 	}
 
-	if (!module_loaded("nathelper") && !module_loaded("outbound"))
+	if (((ws_sub_protocols & SUB_PROTOCOL_SIP) == SUB_PROTOCOL_SIP)
+			&& !module_loaded("nathelper")
+			&& !module_loaded("outbound"))
 	{
 		LM_WARN("neither \"nathelper\" nor \"outbound\" modules are"
 			" loaded. At least one of these is required for correct"




More information about the sr-dev mailing list