mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
raop: log last error on connection failure
This commit is contained in:
parent
de211f4e89
commit
9a93a60fbf
1 changed files with 4 additions and 1 deletions
|
|
@ -490,6 +490,7 @@ int pw_rtsp_client_connect(struct pw_rtsp_client *client,
|
||||||
pw_log_error("getaddrinfo: %s", gai_strerror(res));
|
pw_log_error("getaddrinfo: %s", gai_strerror(res));
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
res = -ENOENT;
|
||||||
for (rp = result; rp != NULL; rp = rp->ai_next) {
|
for (rp = result; rp != NULL; rp = rp->ai_next) {
|
||||||
fd = socket(rp->ai_family,
|
fd = socket(rp->ai_family,
|
||||||
rp->ai_socktype | SOCK_CLOEXEC | SOCK_NONBLOCK,
|
rp->ai_socktype | SOCK_CLOEXEC | SOCK_NONBLOCK,
|
||||||
|
|
@ -501,12 +502,14 @@ int pw_rtsp_client_connect(struct pw_rtsp_client *client,
|
||||||
if (res == 0 || (res < 0 && errno == EINPROGRESS))
|
if (res == 0 || (res < 0 && errno == EINPROGRESS))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
res = -errno;
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
freeaddrinfo(result);
|
freeaddrinfo(result);
|
||||||
|
|
||||||
if (rp == NULL) {
|
if (rp == NULL) {
|
||||||
pw_log_error("Could not connect to %s:%u", hostname, port);
|
pw_log_error("Could not connect to %s:%u: %s", hostname, port,
|
||||||
|
spa_strerror(res));
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue