Fix bug introduced by removing pointer indirection.
This commit is contained in:
parent
c86636d636
commit
33980ebacf
@ -24,7 +24,7 @@ func displayDevice(indent indentLevel, device *goupnp.Device) {
|
|||||||
if srv.ServiceType == goupnp.ServiceTypeWANPPPConnection {
|
if srv.ServiceType == goupnp.ServiceTypeWANPPPConnection {
|
||||||
results, err := goupnp.PerformSoapAction(goupnp.ServiceTypeWANPPPConnection, "GetExternalIPAddress", &srv.ControlURL.URL, nil)
|
results, err := goupnp.PerformSoapAction(goupnp.ServiceTypeWANPPPConnection, "GetExternalIPAddress", &srv.ControlURL.URL, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println("Error calling GetExternalIPAddress:", err)
|
||||||
} else {
|
} else {
|
||||||
fmt.Println(results)
|
fmt.Println(results)
|
||||||
}
|
}
|
||||||
|
12
device.go
12
device.go
@ -59,14 +59,14 @@ func (device *Device) SetURLBase(urlBase *url.URL) {
|
|||||||
device.ManufacturerURL.SetURLBase(urlBase)
|
device.ManufacturerURL.SetURLBase(urlBase)
|
||||||
device.ModelURL.SetURLBase(urlBase)
|
device.ModelURL.SetURLBase(urlBase)
|
||||||
device.PresentationURL.SetURLBase(urlBase)
|
device.PresentationURL.SetURLBase(urlBase)
|
||||||
for _, icon := range device.Icons {
|
for i := range device.Icons {
|
||||||
icon.SetURLBase(urlBase)
|
device.Icons[i].SetURLBase(urlBase)
|
||||||
}
|
}
|
||||||
for _, srv := range device.Services {
|
for i := range device.Services {
|
||||||
srv.SetURLBase(urlBase)
|
device.Services[i].SetURLBase(urlBase)
|
||||||
}
|
}
|
||||||
for _, child := range device.Devices {
|
for i := range device.Devices {
|
||||||
child.SetURLBase(urlBase)
|
device.Devices[i].SetURLBase(urlBase)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user