mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-09 06:37:47 +02:00
bug fixes for 2.6.5
+ Added potential fixes for #34 and #39 + Added better error handling for #43
This commit is contained in:
@@ -156,11 +156,19 @@ func HandleUptimeMonitorListing(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// Handle listing current registered mdns nodes
|
||||
func HandleMdnsListing(w http.ResponseWriter, r *http.Request) {
|
||||
if mdnsScanner == nil {
|
||||
utils.SendErrorResponse(w, "mDNS scanner is disabled on this host")
|
||||
return
|
||||
}
|
||||
js, _ := json.Marshal(previousmdnsScanResults)
|
||||
utils.SendJSONResponse(w, string(js))
|
||||
}
|
||||
|
||||
func HandleMdnsScanning(w http.ResponseWriter, r *http.Request) {
|
||||
if mdnsScanner == nil {
|
||||
utils.SendErrorResponse(w, "mDNS scanner is disabled on this host")
|
||||
return
|
||||
}
|
||||
domain, err := utils.PostPara(r, "domain")
|
||||
var hosts []*mdns.NetworkHost
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user