summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/transfers.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-05-31 04:53:29 +0200
committerGitHub <noreply@github.com>2019-05-31 04:53:29 +0200
commit558ce8d1417d3980e4622b3293a2e16ee1e267cb (patch)
tree946c3e52196f598acc111db1875896733e15838d /pkg/varlinkapi/transfers.go
parent88b7a221a2303f1b1b6664a07b3aafd7d037307b (diff)
parent90ae7206f3ac989c6bc435c03badadcd25976eef (diff)
downloadpodman-558ce8d1417d3980e4622b3293a2e16ee1e267cb.tar.gz
podman-558ce8d1417d3980e4622b3293a2e16ee1e267cb.tar.bz2
podman-558ce8d1417d3980e4622b3293a2e16ee1e267cb.zip
Merge pull request #3224 from haraldh/varlink_upgrade
Fix for varlink upgrade connections
Diffstat (limited to 'pkg/varlinkapi/transfers.go')
-rw-r--r--pkg/varlinkapi/transfers.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkg/varlinkapi/transfers.go b/pkg/varlinkapi/transfers.go
index 96f76bcdc..24a91a86f 100644
--- a/pkg/varlinkapi/transfers.go
+++ b/pkg/varlinkapi/transfers.go
@@ -29,6 +29,12 @@ func (i *LibpodAPI) SendFile(call iopodman.VarlinkCall, ftype string, length int
return call.ReplyErrorOccurred(err.Error())
}
+ // FIXME return parameter
+ if err = call.ReplySendFile("FIXME_file_handle"); err != nil {
+ // If an error occurs while sending the reply, return the error
+ return err
+ }
+
writer := bufio.NewWriter(outputFile)
defer writer.Flush()
@@ -60,9 +66,10 @@ func (i *LibpodAPI) ReceiveFile(call iopodman.VarlinkCall, filepath string, dele
}
// Send the file length down to client
- // Varlink connection upraded
+ // Varlink connection upgraded
if err = call.ReplyReceiveFile(fileInfo.Size()); err != nil {
- return call.ReplyErrorOccurred(err.Error())
+ // If an error occurs while sending the reply, return the error
+ return err
}
reader := bufio.NewReader(fs)