mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
raop: fix errno check
This commit is contained in:
parent
140c8d0cd9
commit
8e3eaf7952
1 changed files with 8 additions and 4 deletions
|
|
@ -203,9 +203,12 @@ static int read_line(struct pw_rtsp_client *client, char **buf)
|
||||||
if (res == 0)
|
if (res == 0)
|
||||||
return -EPIPE;
|
return -EPIPE;
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
if (res == EAGAIN)
|
res = -errno;
|
||||||
return 0;
|
if (res == -EINTR)
|
||||||
return -errno;
|
continue;
|
||||||
|
if (res != -EAGAIN && res != -EWOULDBLOCK)
|
||||||
|
return res;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
if (c == '\n') {
|
if (c == '\n') {
|
||||||
client->line_buf[client->line_pos] = '\0';
|
client->line_buf[client->line_pos] = '\0';
|
||||||
|
|
@ -435,9 +438,10 @@ int pw_rtsp_client_connect(struct pw_rtsp_client *client,
|
||||||
true, on_source_io, client);
|
true, on_source_io, client);
|
||||||
|
|
||||||
if (client->source == NULL) {
|
if (client->source == NULL) {
|
||||||
|
res = -errno;
|
||||||
pw_log_error("%p: source create failed: %m", client);
|
pw_log_error("%p: source create failed: %m", client);
|
||||||
close(fd);
|
close(fd);
|
||||||
return -errno;
|
return res;
|
||||||
}
|
}
|
||||||
client->connecting = true;
|
client->connecting = true;
|
||||||
free(client->session_id);
|
free(client->session_id);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue