forked from TrueCloudLab/rclone
vendor: update all dependencies
This commit is contained in:
parent
940df88eb2
commit
d64789528d
4309 changed files with 1327278 additions and 1001118 deletions
17
vendor/github.com/pkg/sftp/packet-manager.go
generated
vendored
17
vendor/github.com/pkg/sftp/packet-manager.go
generated
vendored
|
@ -2,6 +2,7 @@ package sftp
|
|||
|
||||
import (
|
||||
"encoding"
|
||||
"sort"
|
||||
"sync"
|
||||
)
|
||||
|
||||
|
@ -37,6 +38,22 @@ func newPktMgr(sender packetSender) *packetManager {
|
|||
return s
|
||||
}
|
||||
|
||||
type responsePackets []responsePacket
|
||||
|
||||
func (r responsePackets) Sort() {
|
||||
sort.Slice(r, func(i, j int) bool {
|
||||
return r[i].id() < r[j].id()
|
||||
})
|
||||
}
|
||||
|
||||
type requestPacketIDs []uint32
|
||||
|
||||
func (r requestPacketIDs) Sort() {
|
||||
sort.Slice(r, func(i, j int) bool {
|
||||
return r[i] < r[j]
|
||||
})
|
||||
}
|
||||
|
||||
// register incoming packets to be handled
|
||||
// send id of 0 for packets without id
|
||||
func (s *packetManager) incomingPacket(pkt requestPacket) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue