Przeglądaj źródła

modules/websocket: Added check to stop Kamailio starting if WebSocket is loaded without xhttp

Peter Dunkley 12 lat temu
rodzic
commit
116ba23c60
1 zmienionych plików z 6 dodań i 0 usunięć
  1. 6 0
      modules/websocket/ws_mod.c

+ 6 - 0
modules/websocket/ws_mod.c

@@ -272,6 +272,12 @@ static int mod_init(void)
 	}
 	cfg_get(websocket, ws_cfg, keepalive_timeout) = ws_keepalive_timeout;
 
+	if (!module_loaded("xhttp"))
+	{
+		LM_ERR("\"xhttp\" must be loaded to use WebSocket.\n");
+		return -1;
+	}
+
 	if (!module_loaded("nathelper") && !module_loaded("outbound"))
 	{
 		LM_WARN("neither \"nathelper\" nor \"outbound\" modules are"