diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-05-23 13:12:48 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-05-23 13:12:48 +0300 |
commit | 69de1780a0824afbd6d7e52e4df7cd4bfa931974 (patch) | |
tree | 243e430c51c7c9574ba065ea54e347be8077b3aa /src/mod_sip.erl | |
parent | Get rid of sql_queries.erl (diff) |
Introduce --enable-stun and --enable-sip configure options
STUN/TURN and SIP is not compiled by default anymore.
Use --enable-stun, --enable-sip or --enable-all to enable them.
Diffstat (limited to 'src/mod_sip.erl')
-rw-r--r-- | src/mod_sip.erl | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/mod_sip.erl b/src/mod_sip.erl index eb5cbe545..7c3e60917 100644 --- a/src/mod_sip.erl +++ b/src/mod_sip.erl @@ -25,6 +25,20 @@ -module(mod_sip). -protocol({rfc, 3261}). +-include("logger.hrl"). + +-ifndef(SIP). +-export([start/2, stop/1, depends/2, mod_opt_type/1]). +start(_, _) -> + ?CRITICAL_MSG("ejabberd is not compiled with SIP support", []), + {error, sip_not_compiled}. +stop(_) -> + ok. +depends(_, _) -> + []. +mod_opt_type(_) -> + []. +-else. -behaviour(gen_mod). -behaviour(esip). @@ -37,7 +51,6 @@ locate/1, mod_opt_type/1, depends/2]). -include("ejabberd.hrl"). --include("logger.hrl"). -include_lib("esip/include/esip.hrl"). %%%=================================================================== @@ -350,3 +363,5 @@ mod_opt_type(via) -> mod_opt_type(_) -> [always_record_route, flow_timeout_tcp, flow_timeout_udp, record_route, routes, via]. + +-endif. |