Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-unixfs
Commits
81b4b381
Commit
81b4b381
authored
Sep 21, 2014
by
Juan Batiz-Benet
Committed by
Brian Tiger Chow
Sep 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RPC Address init + checks
parent
16533041
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
cmd/ipfs/init.go
cmd/ipfs/init.go
+4
-1
cmd/ipfs/mount_unix.go
cmd/ipfs/mount_unix.go
+6
-0
No files found.
cmd/ipfs/init.go
View file @
81b4b381
...
...
@@ -71,7 +71,10 @@ func initCmd(c *commander.Command, inp []string) error {
cfg
.
Identity
=
new
(
config
.
Identity
)
// This needs thought
cfg
.
Identity
.
Address
=
"/ip4/127.0.0.1/tcp/4001"
cfg
.
Identity
.
Address
=
"/ip4/127.0.0.1/tcp/5001"
// local RPC endpoint
cfg
.
RPCAddress
=
"/ip4/127.0.0.1/tcp/4001"
nbits
,
ok
:=
c
.
Flag
.
Lookup
(
"b"
)
.
Value
.
Get
()
.
(
int
)
if
!
ok
{
...
...
cmd/ipfs/mount_unix.go
View file @
81b4b381
...
...
@@ -3,6 +3,7 @@
package
main
import
(
"errors"
"fmt"
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/gonuts/flag"
...
...
@@ -44,6 +45,11 @@ func mountCmd(c *commander.Command, inp []string) error {
return
err
}
// launch the RPC endpoint.
if
n
.
Config
.
RPCAddress
==
""
{
return
errors
.
New
(
"no config.RPCAddress endpoint supplied"
)
}
maddr
,
err
:=
ma
.
NewMultiaddr
(
n
.
Config
.
RPCAddress
)
if
err
!=
nil
{
return
err
...
...
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