raop: Use the port supplied by avahi when connecting to RAOP devices.

The Apple TV for example uses a non-default port, but we previously ignored
this. We now correctly parse the server string but in so doing, we end up
parsing the address twice. As we need a pure IP/hostname of the device itself
to use in our requests, this is somewhat unavoidable.

Sadly there are still other problems with Apple TVs, but this is still
one step closer.

Fixes part of #950
This commit is contained in:
Colin Guthrie 2011-09-05 22:19:41 +01:00
parent 8e298848be
commit d36a9df63c
3 changed files with 20 additions and 12 deletions

View file

@ -324,6 +324,7 @@ int pa_rtsp_connect(pa_rtsp_client *c) {
pa_xfree(c->session);
c->session = NULL;
pa_log_debug("Attempting to connect to server '%s:%d'", c->hostname, c->port);
if (!(c->sc = pa_socket_client_new_string(c->mainloop, TRUE, c->hostname, c->port))) {
pa_log("failed to connect to server '%s:%d'", c->hostname, c->port);
return -1;