mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
module-rtp-source: Use make_socket() error value instead of errno
make_socket() already returns the negative errno.
This commit is contained in:
parent
f1ffd5e5e8
commit
5d21e12658
1 changed files with 3 additions and 3 deletions
|
|
@ -433,7 +433,7 @@ static void stream_open_connection(void *data, int *result)
|
||||||
* stream_start() call after some time. The stream_start_retry_timer exists
|
* stream_start() call after some time. The stream_start_retry_timer exists
|
||||||
* precisely for that purpose. This means that ENODEV is not treated as
|
* precisely for that purpose. This means that ENODEV is not treated as
|
||||||
* an error, but instead, it triggers the creation of that timer. */
|
* an error, but instead, it triggers the creation of that timer. */
|
||||||
if (errno == ENODEV) {
|
if (fd == -ENODEV) {
|
||||||
pw_log_warn("failed to create socket because network device is not ready "
|
pw_log_warn("failed to create socket because network device is not ready "
|
||||||
"and present yet; will try again");
|
"and present yet; will try again");
|
||||||
|
|
||||||
|
|
@ -449,12 +449,12 @@ static void stream_open_connection(void *data, int *result)
|
||||||
res = 0;
|
res = 0;
|
||||||
goto finish;
|
goto finish;
|
||||||
} else {
|
} else {
|
||||||
pw_log_error("failed to create socket: %m");
|
pw_log_error("failed to create socket: %s", spa_strerror(fd));
|
||||||
/* If ENODEV was returned earlier, and the stream_start_retry_timer
|
/* If ENODEV was returned earlier, and the stream_start_retry_timer
|
||||||
* was consequently created, but then a non-ENODEV error occurred,
|
* was consequently created, but then a non-ENODEV error occurred,
|
||||||
* the timer must be stopped and removed. */
|
* the timer must be stopped and removed. */
|
||||||
pw_timer_queue_cancel(&impl->stream_start_retry_timer);
|
pw_timer_queue_cancel(&impl->stream_start_retry_timer);
|
||||||
res = -errno;
|
res = fd;
|
||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue