Fix returned types
This commit is contained in:
parent
89025eea39
commit
64205426bf
|
@ -539,7 +539,7 @@ delete_session(#sip_session{reg_tref = RegTRef,
|
||||||
mnesia:dirty_delete_object(Session).
|
mnesia:dirty_delete_object(Session).
|
||||||
|
|
||||||
process_ping(SIPSocket) ->
|
process_ping(SIPSocket) ->
|
||||||
ErrResponse = if SIPSocket#sip_socket.type == udp -> error;
|
ErrResponse = if SIPSocket#sip_socket.type == udp -> pang;
|
||||||
true -> drop
|
true -> drop
|
||||||
end,
|
end,
|
||||||
Sessions = mnesia:dirty_index_read(
|
Sessions = mnesia:dirty_index_read(
|
||||||
|
@ -552,8 +552,13 @@ process_ping(SIPSocket) ->
|
||||||
mnesia:dirty_delete_object(Session),
|
mnesia:dirty_delete_object(Session),
|
||||||
Timeout = get_flow_timeout(LServer, SIPSocket),
|
Timeout = get_flow_timeout(LServer, SIPSocket),
|
||||||
NewTRef = set_timer(Session, Timeout),
|
NewTRef = set_timer(Session, Timeout),
|
||||||
mnesia:dirty_write(
|
case mnesia:dirty_write(
|
||||||
Session#sip_session{flow_tref = NewTRef});
|
Session#sip_session{flow_tref = NewTRef}) of
|
||||||
|
ok ->
|
||||||
|
pong;
|
||||||
|
_Err ->
|
||||||
|
pang
|
||||||
|
end;
|
||||||
(_, Acc) ->
|
(_, Acc) ->
|
||||||
Acc
|
Acc
|
||||||
end, ErrResponse, Sessions).
|
end, ErrResponse, Sessions).
|
||||||
|
|
Loading…
Reference in New Issue