Module: sip-router Branch: master Commit: b220a571d010851ee72c6bf6263a958335283b62 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b220a571...
Author: Peter Dunkley peter.dunkley@crocodile-rcs.com Committer: Peter Dunkley peter.dunkley@crocodile-rcs.com Date: Sun May 12 13:55:46 2013 +0100
modules/websocket: added warning when websocket module is loaded in a configuration without either the nathelper or outbound modules
---
modules/websocket/ws_mod.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/modules/websocket/ws_mod.c b/modules/websocket/ws_mod.c index 9b82dea..c6331f7 100644 --- a/modules/websocket/ws_mod.c +++ b/modules/websocket/ws_mod.c @@ -265,12 +265,20 @@ static int mod_init(void) }
if (cfg_declare("websocket", ws_cfg_def, &default_ws_cfg, - cfg_sizeof(websocket), &ws_cfg)) { + cfg_sizeof(websocket), &ws_cfg)) + { LM_ERR("declaring configuration\n"); return -1; } cfg_get(websocket, ws_cfg, keepalive_timeout) = ws_keepalive_timeout;
+ if (!module_loaded("nathelper") && !module_loaded("outbound")) + { + LM_WARN("neither "nathelper" nor "outbound" modules are" + " loaded. At least one of these is required for correct" + " routing of SIP over WebSocket.\n"); + } + return 0;
error: