internal/pipewire: do not clobber error parsing SCMs
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 2m35s
Test / Sandbox (race detector) (push) Successful in 4m43s
Test / Hakurei (push) Successful in 4m50s
Test / Hpkg (push) Successful in 4m54s
Test / Hakurei (race detector) (push) Successful in 6m29s
Test / Flake checks (push) Successful in 1m21s
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 2m35s
Test / Sandbox (race detector) (push) Successful in 4m43s
Test / Hakurei (push) Successful in 4m50s
Test / Hpkg (push) Successful in 4m54s
Test / Hakurei (race detector) (push) Successful in 6m29s
Test / Flake checks (push) Successful in 1m21s
The error is handled later, clobbering it here breaks error handling when SCMs are present. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
be2075f169
commit
5ec4045e24
@ -271,16 +271,20 @@ func (ctx *Context) recvmsg(remaining []byte) (payload []byte, err error) {
|
||||
n, oobn, recvflags, err = ctx.conn.Recvmsg(ctx.iovecBuf[len(remaining):], ctx.oobBuf[:], recvmsgFlags)
|
||||
|
||||
if oob := ctx.oobBuf[:oobn]; len(oob) > 0 {
|
||||
var oobErr error
|
||||
|
||||
var scm []syscall.SocketControlMessage
|
||||
if scm, err = syscall.ParseSocketControlMessage(oob); err != nil {
|
||||
if scm, oobErr = syscall.ParseSocketControlMessage(oob); oobErr != nil {
|
||||
ctx.closeReceivedFiles()
|
||||
err = oobErr
|
||||
return
|
||||
}
|
||||
|
||||
var fds []int
|
||||
for i := range scm {
|
||||
if fds, err = syscall.ParseUnixRights(&scm[i]); err != nil {
|
||||
if fds, oobErr = syscall.ParseUnixRights(&scm[i]); oobErr != nil {
|
||||
ctx.closeReceivedFiles()
|
||||
err = oobErr
|
||||
return
|
||||
}
|
||||
ctx.receivedFiles = append(ctx.receivedFiles, fds...)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user