mirror of
https://github.com/go-i2p/goSam.git
synced 2025-06-10 09:40:48 -04:00
small fixes for i2pd
This commit is contained in:
@ -2,6 +2,7 @@ package goSam
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
// Lookup askes SAM for the internal i2p address from name
|
||||
@ -25,8 +26,12 @@ func (c *Client) Lookup(name string) (addr string, err error) {
|
||||
}
|
||||
|
||||
if r.Pairs["NAME"] != name {
|
||||
err = fmt.Errorf("i2p Replyed to another name.\nWanted:%s\nGot: %+v\n", name, r)
|
||||
return
|
||||
// somehow different on i2pd
|
||||
if r.Pairs["NAME"] != "ME" {
|
||||
err = fmt.Errorf("Lookup() Replyed to another name.\nWanted:%s\nGot: %+v\n", name, r)
|
||||
return
|
||||
}
|
||||
fmt.Fprintln(os.Stderr, "WARNING: Lookup() Replyed to another name. assuming i2pd c++ fluke")
|
||||
}
|
||||
|
||||
addr = r.Pairs["VALUE"]
|
||||
|
Reference in New Issue
Block a user