mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-13 05:33:55 -04:00
modules: return the error of getsockopt instead of -EPIPE
This commit is contained in:
parent
6e332a5d32
commit
2f65cf7124
3 changed files with 6 additions and 9 deletions
|
|
@ -447,9 +447,8 @@ on_source_io(void *data, int fd, uint32_t mask)
|
|||
if (mask & (SPA_IO_ERR | SPA_IO_HUP)) {
|
||||
socklen_t len = sizeof(res);
|
||||
if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &res, &len) < 0)
|
||||
res = -EPIPE;
|
||||
else
|
||||
res = -res;
|
||||
res = errno;
|
||||
res = -res;
|
||||
goto error;
|
||||
}
|
||||
if (mask & SPA_IO_IN) {
|
||||
|
|
|
|||
|
|
@ -714,9 +714,8 @@ on_source_io(void *data, int fd, uint32_t mask)
|
|||
if (mask & (SPA_IO_ERR | SPA_IO_HUP)) {
|
||||
socklen_t len = sizeof(res);
|
||||
if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &res, &len) < 0)
|
||||
res = -EPIPE;
|
||||
else
|
||||
res = -res;
|
||||
res = errno;
|
||||
res = -res;
|
||||
goto error;
|
||||
}
|
||||
if (mask & SPA_IO_IN) {
|
||||
|
|
|
|||
|
|
@ -383,9 +383,8 @@ on_source_io(void *data, int fd, uint32_t mask)
|
|||
if (mask & (SPA_IO_ERR | SPA_IO_HUP)) {
|
||||
socklen_t len = sizeof(res);
|
||||
if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &res, &len) < 0)
|
||||
res = -EPIPE;
|
||||
else
|
||||
res = -res;
|
||||
res = errno;
|
||||
res = -res;
|
||||
goto error;
|
||||
}
|
||||
if (mask & SPA_IO_IN) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue