Commit 771d94ca authored by Marian Durkovic's avatar Marian Durkovic

our address needs to be fetched via getsockname()

- now SAP announces have proper source address in o= line
parent b83ce73c
......@@ -552,7 +552,7 @@ static inline int net_GetSockAddress( int fd, char *address, int *port )
struct sockaddr_storage addr;
socklen_t addrlen = sizeof( addr );
return getpeername( fd, (struct sockaddr *)&addr, &addrlen )
return getsockname( fd, (struct sockaddr *)&addr, &addrlen )
|| vlc_getnameinfo( (struct sockaddr *)&addr, addrlen, address,
NI_MAXNUMERICHOST, port, NI_NUMERICHOST )
? VLC_EGENERIC : 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment