mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-10 22:10:15 -05:00
[raop] Fix possible incorrect address family in SDP
This commit is contained in:
@@ -142,10 +142,10 @@ void evrtsp_connection_set_base(struct evrtsp_connection *evcon,
|
||||
void evrtsp_connection_get_peer(struct evrtsp_connection *evcon,
|
||||
char **address, u_short *port);
|
||||
|
||||
/** Get the local address and port associated with this connection. */
|
||||
/** Get the local address, port and family associated with this connection. */
|
||||
void
|
||||
evrtsp_connection_get_local_address(struct evrtsp_connection *evcon,
|
||||
char **address, u_short *port);
|
||||
char **address, u_short *port, int *family);
|
||||
|
||||
/** The connection gets ownership of the request */
|
||||
int evrtsp_make_request(struct evrtsp_connection *evcon,
|
||||
|
||||
@@ -1300,7 +1300,7 @@ evrtsp_connection_set_closecb(struct evrtsp_connection *evcon,
|
||||
|
||||
void
|
||||
evrtsp_connection_get_local_address(struct evrtsp_connection *evcon,
|
||||
char **address, u_short *port)
|
||||
char **address, u_short *port, int *family)
|
||||
{
|
||||
union {
|
||||
struct sockaddr_storage ss;
|
||||
@@ -1327,7 +1327,9 @@ evrtsp_connection_get_local_address(struct evrtsp_connection *evcon,
|
||||
if (!*address)
|
||||
return;
|
||||
|
||||
switch (addr.ss.ss_family)
|
||||
*family = addr.ss.ss_family;
|
||||
|
||||
switch (*family)
|
||||
{
|
||||
case AF_INET:
|
||||
*port = ntohs(addr.sin.sin_port);
|
||||
|
||||
Reference in New Issue
Block a user