Fix bug introduced by removing pointer indirection.

This commit is contained in:
John Beisley 2013-09-29 16:09:10 +01:00
parent c86636d636
commit 33980ebacf
2 changed files with 7 additions and 7 deletions

View File

@ -24,7 +24,7 @@ func displayDevice(indent indentLevel, device *goupnp.Device) {
if srv.ServiceType == goupnp.ServiceTypeWANPPPConnection {
results, err := goupnp.PerformSoapAction(goupnp.ServiceTypeWANPPPConnection, "GetExternalIPAddress", &srv.ControlURL.URL, nil)
if err != nil {
fmt.Println(err)
fmt.Println("Error calling GetExternalIPAddress:", err)
} else {
fmt.Println(results)
}

View File

@ -59,14 +59,14 @@ func (device *Device) SetURLBase(urlBase *url.URL) {
device.ManufacturerURL.SetURLBase(urlBase)
device.ModelURL.SetURLBase(urlBase)
device.PresentationURL.SetURLBase(urlBase)
for _, icon := range device.Icons {
icon.SetURLBase(urlBase)
for i := range device.Icons {
device.Icons[i].SetURLBase(urlBase)
}
for _, srv := range device.Services {
srv.SetURLBase(urlBase)
for i := range device.Services {
device.Services[i].SetURLBase(urlBase)
}
for _, child := range device.Devices {
child.SetURLBase(urlBase)
for i := range device.Devices {
device.Devices[i].SetURLBase(urlBase)
}
}