mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 04:37:36 +03:00
remove the header parameter for parsing frames
It was only needed for parsing STOP_WAITING frames.
This commit is contained in:
parent
f0354c0d94
commit
2eed03c747
3 changed files with 23 additions and 23 deletions
|
@ -62,7 +62,7 @@ func (u *packetUnpacker) Unpack(headerBinary []byte, hdr *wire.Header, data []by
|
|||
return nil, qerr.Error(qerr.DecryptionFailure, err.Error())
|
||||
}
|
||||
|
||||
fs, err := u.parseFrames(decrypted, hdr)
|
||||
fs, err := u.parseFrames(decrypted)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ func (u *packetUnpacker) Unpack(headerBinary []byte, hdr *wire.Header, data []by
|
|||
}, nil
|
||||
}
|
||||
|
||||
func (u *packetUnpacker) parseFrames(decrypted []byte, hdr *wire.Header) ([]wire.Frame, error) {
|
||||
func (u *packetUnpacker) parseFrames(decrypted []byte) ([]wire.Frame, error) {
|
||||
r := bytes.NewReader(decrypted)
|
||||
if r.Len() == 0 {
|
||||
return nil, qerr.MissingPayload
|
||||
|
@ -82,7 +82,7 @@ func (u *packetUnpacker) parseFrames(decrypted []byte, hdr *wire.Header) ([]wire
|
|||
fs := make([]wire.Frame, 0, 2)
|
||||
// Read all frames in the packet
|
||||
for {
|
||||
frame, err := wire.ParseNextFrame(r, hdr, u.version)
|
||||
frame, err := wire.ParseNextFrame(r, u.version)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue