Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
张蕾
Geth-Modification
Commits
afecb93e
Commit
afecb93e
authored
Sep 28, 2016
by
ken10100147
Committed by
Felix Lange
Sep 28, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
p2p/nat: fix parameter order for AddMapping
parent
437c3863
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
nat.go
p2p/nat/nat.go
+2
-2
No files found.
p2p/nat/nat.go
View file @
afecb93e
...
...
@@ -105,7 +105,7 @@ func Map(m Interface, c chan struct{}, protocol string, extport, intport int, na
glog
.
V
(
logger
.
Debug
)
.
Infof
(
"deleting port mapping: %s %d -> %d (%s) using %s
\n
"
,
protocol
,
extport
,
intport
,
name
,
m
)
m
.
DeleteMapping
(
protocol
,
extport
,
intport
)
}()
if
err
:=
m
.
AddMapping
(
protocol
,
intport
,
ex
tport
,
name
,
mapTimeout
);
err
!=
nil
{
if
err
:=
m
.
AddMapping
(
protocol
,
extport
,
in
tport
,
name
,
mapTimeout
);
err
!=
nil
{
glog
.
V
(
logger
.
Debug
)
.
Infof
(
"network port %s:%d could not be mapped: %v
\n
"
,
protocol
,
intport
,
err
)
}
else
{
glog
.
V
(
logger
.
Info
)
.
Infof
(
"mapped network port %s:%d -> %d (%s) using %s
\n
"
,
protocol
,
extport
,
intport
,
name
,
m
)
...
...
@@ -118,7 +118,7 @@ func Map(m Interface, c chan struct{}, protocol string, extport, intport int, na
}
case
<-
refresh
.
C
:
glog
.
V
(
logger
.
Detail
)
.
Infof
(
"refresh port mapping %s:%d -> %d (%s) using %s
\n
"
,
protocol
,
extport
,
intport
,
name
,
m
)
if
err
:=
m
.
AddMapping
(
protocol
,
intport
,
ex
tport
,
name
,
mapTimeout
);
err
!=
nil
{
if
err
:=
m
.
AddMapping
(
protocol
,
extport
,
in
tport
,
name
,
mapTimeout
);
err
!=
nil
{
glog
.
V
(
logger
.
Debug
)
.
Infof
(
"network port %s:%d could not be mapped: %v
\n
"
,
protocol
,
intport
,
err
)
}
refresh
.
Reset
(
mapUpdateInterval
)
...
...
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