Using a more appropriate name for the Address

This commit is contained in:
Apfel 2019-02-12 06:59:48 +01:00
parent f72c94ede9
commit 143f7debd8
3 changed files with 11 additions and 9 deletions

View File

@ -1,8 +1,8 @@
<Config>
<Address>127.0.0.1:8080</Address>
<SQLUser>uwu</SQLUser>
<SQLPass>owo</SQLPass>
<SQLDB>wiisoap</SQLDB>
<SQLPort>127.0.0.1:3306</SQLPort>
<Port>127.0.0.1:8080</Port>
<!-- Please use an address for the port. Failing to do so will cause oddities to occur with WiiSOAP. -->
</Config>

View File

@ -70,9 +70,9 @@ func main() {
CheckError(err)
// Start the HTTP server.
fmt.Printf("Starting HTTP connection (%s)...\nNot using the usual port for HTTP? Be sure to use a proxy, otherwise the Wii can't connect!", CON.Port)
fmt.Printf("Starting HTTP connection (%s)...\nNot using the usual port for HTTP? Be sure to use a proxy, otherwise the Wii can't connect!", CON.Address)
http.HandleFunc("/", handler) // each request calls handler
log.Fatal(http.ListenAndServe(CON.Port, nil))
log.Fatal(http.ListenAndServe(CON.Address, nil))
// From here on out, all special cool things should go into the handler function.
}

View File

@ -27,11 +27,13 @@ import "encoding/xml"
// Config - WiiSOAP Configuration data.
type Config struct {
XMLName xml.Name `xml:"Config"`
SQLUser string `xml:"SQLUser"`
SQLPass string `xml:"SQLPass"`
SQLPort string `xml:"SQLPort"`
Port string `xml:"Port"`
SQLDB string `xml:"SQLDB"`
Address string `xml:"Address"`
SQLUser string `xml:"SQLUser"`
SQLPass string `xml:"SQLPass"`
SQLPort string `xml:"SQLPort"`
SQLDB string `xml:"SQLDB"`
}
// CDS - CheckDeviceStatus