Add patch for boruta httpo client to get ip
authorAleksander Mistewicz <a.mistewicz@samsung.com>
Wed, 13 Dec 2017 19:04:03 +0000 (20:04 +0100)
committerPawel Wieczorek <p.wieczorek2@samsung.com>
Fri, 5 Jan 2018 14:23:57 +0000 (15:23 +0100)
Change-Id: Iebd74224b9e3fde5c02b7e921589623a6cd389c4

0001-DRAGONS-AHEAD-do-not-use-it-if-you-can.patch [new file with mode: 0644]

diff --git a/0001-DRAGONS-AHEAD-do-not-use-it-if-you-can.patch b/0001-DRAGONS-AHEAD-do-not-use-it-if-you-can.patch
new file mode 100644 (file)
index 0000000..9fbea2c
--- /dev/null
@@ -0,0 +1,33 @@
+From 9a38b89bc0c25f8d86a652e42438d658df6cce60 Mon Sep 17 00:00:00 2001
+From: Aleksander Mistewicz <a.mistewicz@samsung.com>
+Date: Wed, 13 Dec 2017 19:53:49 +0100
+Subject: [PATCH] DRAGONS AHEAD do not use it if you can
+
+Change-Id: I9478d087531813201fba842b28798bb46cd3c5c0
+---
+ http/client/client.go | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/http/client/client.go b/http/client/client.go
+index 4d86d8e..6257586 100644
+--- a/http/client/client.go
++++ b/http/client/client.go
+@@ -27,6 +27,7 @@ import (
+       "io/ioutil"
+       "net"
+       "net/http"
++      "strings"
+       "time"
+       "git.tizen.org/tools/boruta"
+@@ -228,6 +229,7 @@ func (client *BorutaClient) AcquireWorker(reqID boruta.ReqID) (
+       }
+       var accInfo locAccessInfo
+       err = processResponse(resp, &accInfo)
++      accInfo.Addr.IP = net.ParseIP(strings.TrimLeft(strings.Split(client.url, ":")[1], "/"))
+       accInfoRet := &boruta.AccessInfo{
+               Addr: accInfo.Addr,
+               Key:  accInfo.Key,
+-- 
+2.7.4
+