Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
erlang
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
erlang
Commits
46c37ae6
Unverified
Commit
46c37ae6
authored
Jan 28, 2019
by
Сергей Прохоров
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
All dialyzer errors fixed; dialyzer added to travis.yml
parent
8031dafa
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
13 additions
and
4 deletions
+13
-4
.travis.yml
.travis.yml
+1
-0
gen_timeout.erl
src/gen_timeout.erl
+1
-1
mtp_abridged.erl
src/mtp_abridged.erl
+2
-0
mtp_down_conn.erl
src/mtp_down_conn.erl
+1
-1
mtp_full.erl
src/mtp_full.erl
+2
-0
mtp_handler.erl
src/mtp_handler.erl
+1
-1
mtp_intermediate.erl
src/mtp_intermediate.erl
+2
-0
mtp_rpc.erl
src/mtp_rpc.erl
+3
-1
No files found.
.travis.yml
View file @
46c37ae6
...
...
@@ -8,3 +8,4 @@ script:
-
./rebar3 compile
-
./rebar3 xref
-
./rebar3 eunit
-
./rebar3 dialyzer
src/gen_timeout.erl
View file @
46c37ae6
...
...
@@ -18,7 +18,7 @@
-
export_type
([
tout
/
0
,
opts
/
0
]).
-
record
(
timeout
,
{
ref
::
reference
(),
{
ref
::
reference
()
|
undefined
,
last_bump
::
integer
(),
message
::
any
(),
unit
=
second
::
erlang
:
time_unit
(),
...
...
src/mtp_abridged.erl
View file @
46c37ae6
...
...
@@ -13,6 +13,8 @@
encode_packet
/
2
]).
-
export_type
([
codec
/
0
]).
-
dialyzer
(
no_improper_lists
).
-
record
(
st
,
{
buffer
=
<<>>
::
binary
()}).
-
define
(
MAX_PACKET_SIZE
,
1
*
1024
*
1024
).
% 1mb
...
...
src/mtp_down_conn.erl
View file @
46c37ae6
...
...
@@ -76,7 +76,7 @@ shutdown(Conn) ->
gen_server
:
cast
(
Conn
,
shutdown
).
%% To be called by upstream
-
spec
send
(
handle
(),
iodata
())
->
ok
.
-
spec
send
(
handle
(),
iodata
())
->
ok
|
{
error
,
unknown_upstream
}
.
send
(
Conn
,
Data
)
->
gen_server
:
call
(
Conn
,
{
send
,
Data
},
?
SEND_TIMEOUT
*
2
).
...
...
src/mtp_full.erl
View file @
46c37ae6
...
...
@@ -16,6 +16,8 @@
encode_packet
/
2
]).
-
export_type
([
codec
/
0
]).
-
dialyzer
(
no_improper_lists
).
-
record
(
full_st
,
{
decode_buf
=
<<>>
::
binary
(),
enc_seq_no
::
integer
(),
...
...
src/mtp_handler.erl
View file @
46c37ae6
...
...
@@ -45,7 +45,7 @@
codec
::
mtp_codec
:
codec
()
|
undefined
,
down
::
mtp_down_conn
:
handle
()
|
undefined
,
dc_id
::
{
DcId
::
integer
(),
Pool
::
pid
()},
dc_id
::
{
DcId
::
integer
(),
Pool
::
pid
()}
|
undefined
,
ad_tag
::
binary
(),
addr
::
mtp_config
:
netloc
(),
% IP/Port of remote side
...
...
src/mtp_intermediate.erl
View file @
46c37ae6
...
...
@@ -15,6 +15,8 @@
encode_packet
/
2
]).
-
export_type
([
codec
/
0
]).
-
dialyzer
(
no_improper_lists
).
-
record
(
int_st
,
{
padding
=
false
::
boolean
(),
buffer
=
<<>>
::
binary
()}).
...
...
src/mtp_rpc.erl
View file @
46c37ae6
...
...
@@ -13,6 +13,8 @@
encode_ip_port
/
2
]).
-
export_type
([
codec
/
0
]).
-
dialyzer
(
no_improper_lists
).
-
record
(
rpc_st
,
{
client_addr
::
binary
(),
proxy_addr
::
binary
(),
...
...
@@ -97,7 +99,7 @@ encode_packet({data, Msg}, {{ConnId, ClientAddr, ProxyTag}, ProxyAddr}) ->
encode_packet
(
remote_closed
,
ConnId
)
->
<<?
RPC_CLOSE_CONN
,
ConnId
:
64
/
little
-
signed
>>
.
-
spec
encode_ip_port
(
inet
:
ip_address
(),
inet
:
port_number
())
->
iodata
().
encode_ip_port
(
IPv4
,
Port
)
when
tuple_size
(
IPv4
)
==
4
->
IpBin
=
inet_pton
(
IPv4
),
[
lists
:
duplicate
(
10
,
<<
0
>>
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment