move SAM back

This commit is contained in:
idk 2018-12-26 01:24:05 -05:00
parent 3c7fc231c8
commit 316de2df0f
No known key found for this signature in database
GPG key ID: D75C03B39B5E14E1
2 changed files with 9 additions and 6 deletions

View file

@ -87,13 +87,10 @@ func (m Conn) Cleanup() error {
return nil
}
func NewConn(samhost, samport, addr, path string, opts []string) (*Conn, error) {
func NewConn(sam sam3.SAM, addr, path string, opts []string) (*Conn, error) {
var c Conn
var err error
c.SAM, err = sam3.NewSAM(samhost + ":" + samport)
if err != nil {
return nil, err
}
c.SAM = &sam
c.path = path
t32, err := sam3.NewI2PAddrFromString(addr)
c.name = t32.Base32() + ".i2pkeys"