Commit 0940060a authored by Philipp Huebner's avatar Philipp Huebner

New upstream version 1.0.17

parent 7cb48ce9
sudo: false
language: erlang
before_install:
- pip install --user cpp-coveralls coveralls-merge
install:
- rebar get-deps
script: rebar compile xref && rebar skip_deps=true eunit
otp_release:
- 17.1
- 17.5
- 18.1
after_success:
- coveralls --exclude lib --exclude tests --gcov-options '\-lp' --dump c.json
- coveralls-merge c.json erlang.json
# Version 1.0.17
* Updating fast_tls to version 1.0.18.
# Version 1.0.16
* Updating fast_tls to version 1.0.17.
......
......@@ -22,7 +22,7 @@
{erl_opts, [debug_info, {i, "include"}]}.
{deps, [{fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.0.17"}}},
{deps, [{fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.0.18"}}},
{p1_utils, ".*", {git, "https://github.com/processone/p1_utils", {tag, "1.0.10"}}}]}.
{cover_enabled, true}.
......
......@@ -23,10 +23,10 @@
{application, stun,
[{description, "STUN and TURN library for Erlang / Elixir"},
{vsn, "1.0.16"},
{vsn, "1.0.17"},
{modules, []},
{registered, []},
{applications, [kernel, stdlib]},
{applications, [kernel, stdlib, p1_utils]},
{mod, {stun_app,[]}},
%% hex.pm packaging:
......
......@@ -240,10 +240,9 @@ process(#state{auth = user} = State,
Key = {User, Realm, Pass},
case stun_codec:check_integrity(Msg, Key) of
true ->
error_logger:info_msg(
"accepted long-term STUN authentication "
"for ~s@~s from ~s",
[User, Realm, addr_to_str(State#state.peer)]),
?dbg("accepted long-term STUN authentication "
"for ~s@~s from ~s",
[User, Realm, addr_to_str(State#state.peer)]),
process(NewState, Msg, Key);
false ->
error_logger:info_msg(
......
......@@ -38,6 +38,7 @@
init_test() ->
?assertEqual(ok, application:start(fast_tls)),
?assertEqual(ok, application:start(p1_utils)),
?assertEqual(ok, application:start(stun)).
mk_cert_test() ->
......
......@@ -147,10 +147,9 @@ wait_for_allocate(#stun{class = request,
Lifetime = time_left(State#state.life_timer),
AddrPort = State#state.addr,
RelayAddr = {State#state.relay_ip, RelayPort},
error_logger:info_msg(
"created TURN allocation for ~s@~s from ~s: ~s",
[State#state.username, State#state.realm,
addr_to_str(AddrPort), addr_to_str(RelayAddr)]),
?dbg("created TURN allocation for ~s@~s from ~s: ~s",
[State#state.username, State#state.realm,
addr_to_str(AddrPort), addr_to_str(RelayAddr)]),
R = Resp#stun{class = response,
'XOR-RELAYED-ADDRESS' = RelayAddr,
'LIFETIME' = Lifetime,
......@@ -223,13 +222,12 @@ active(#stun{class = request,
TRef = erlang:start_timer(
?PERMISSION_LIFETIME, self(),
{permission_timeout, Addr}),
error_logger:info_msg(
"created/updated TURN permission for user "
"~s@~s from ~s: ~s <-> ~s",
[State#state.username, State#state.realm,
addr_to_str(State#state.addr),
addr_to_str(State#state.relay_addr),
addr_to_str({Addr, _Port})]),
?dbg("created/updated TURN permission for user "
"~s@~s from ~s: ~s <-> ~s",
[State#state.username, State#state.realm,
addr_to_str(State#state.addr),
addr_to_str(State#state.relay_addr),
addr_to_str({Addr, _Port})]),
?DICT:store(Addr, {Channel, TRef}, Acc)
end, State#state.permissions, XorPeerAddrs),
NewState = State#state{permissions = Perms},
......@@ -385,9 +383,8 @@ terminate(_Reason, _StateName, State) ->
undefined ->
ok;
RAddrPort ->
error_logger:info_msg(
"deleting TURN allocation for ~s@~s from ~s: ~s",
[Username, Realm, addr_to_str(AddrPort), addr_to_str(RAddrPort)])
?dbg("deleting TURN allocation for ~s@~s from ~s: ~s",
[Username, Realm, addr_to_str(AddrPort), addr_to_str(RAddrPort)])
end,
if is_pid(State#state.owner) ->
stun:stop(State#state.owner);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment