diff --git a/client/Iptable.go b/client/Iptable.go index baf3995..7195de6 100644 --- a/client/Iptable.go +++ b/client/Iptable.go @@ -54,7 +54,7 @@ func UpdateIpTableListClient() error { // Check if IP addresses is there in the struct DoNotRead Exists := false for k, _ := range DoNotRead.IpAddress { - if DoNotRead.IpAddress[k].Ipv4 == Addresses.IpAddress[i].Ipv4 { + if DoNotRead.IpAddress[k].Ipv4 == Addresses.IpAddress[j].Ipv4 { Exists = true break } diff --git a/p2p/testingMetrics.go b/p2p/testingMetrics.go index 05a23f9..3ec1a4c 100644 --- a/p2p/testingMetrics.go +++ b/p2p/testingMetrics.go @@ -94,7 +94,7 @@ func (s *IpAddress)DownloadSpeed() error { func (s *IpAddress)UploadSpeed() error { start := time.Now() - b, w := createMultipartFormData("file","50.bin") + b, w := createMultipartFormData("file","/etc/p2p-rendering/50.bin") req, err := http.NewRequest("GET", "http://" + s.Ipv4 + ":8088/upload", &b) if err != nil { diff --git a/server/server.go b/server/server.go index d41c9c9..2e8b12a 100644 --- a/server/server.go +++ b/server/server.go @@ -19,7 +19,7 @@ func Server() { // Speed test with 50 mbps r.GET("/50", func(c *gin.Context){ - c.File("server/50.bin") + c.File("/etc/p2p-rendering/50.bin") }) // Route build to do a speed test