aboutsummaryrefslogtreecommitdiff
path: root/hotline/transaction_handlers.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2021-08-12 19:00:13 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2021-08-12 11:00:13 -0700
commitc5d9af5aa4d9fb20316be45ab1b775bcf61bcad5 (patch)
tree300f7c6814d41ad12ff5665f3f14f24a54c62e4d /hotline/transaction_handlers.go
parent72dd37f1abb2b550aaaac48eac677403d5664797 (diff)
More cleanup
Diffstat (limited to 'hotline/transaction_handlers.go')
-rw-r--r--hotline/transaction_handlers.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/hotline/transaction_handlers.go b/hotline/transaction_handlers.go
index 46f96eb..d7a77e2 100644
--- a/hotline/transaction_handlers.go
+++ b/hotline/transaction_handlers.go
@@ -644,7 +644,7 @@ func HandleListUsers(cc *ClientConn, t *Transaction) (res []Transaction, err err
var userFields []Field
// TODO: make order deterministic
for _, acc := range cc.Server.Accounts {
- userField := acc.Payload()
+ userField := acc.MarshalBinary()
userFields = append(userFields, NewField(fieldData, userField))
}
@@ -1240,7 +1240,10 @@ func HandleDownloadFolder(cc *ClientConn, t *Transaction) (res []Transaction, er
cc.Transfers[FolderDownload] = append(cc.Transfers[FolderDownload], fileTransfer)
var fp FilePath
- fp.UnmarshalBinary(t.GetField(fieldFilePath).Data)
+ err = fp.UnmarshalBinary(t.GetField(fieldFilePath).Data)
+ if err != nil {
+ return res, err
+ }
fullFilePath := fmt.Sprintf("%v%v", cc.Server.Config.FileRoot+fp.String(), string(fileTransfer.FileName))
transferSize, err := CalcTotalSize(fullFilePath)