[pulseaudio-commits] r2406 - /branches/coling/airtunes/src/modules/rtp/rtsp_client.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Sun May 11 08:12:21 PDT 2008
Author: coling
Date: Sun May 11 17:12:20 2008
New Revision: 2406
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2406&root=pulseaudio&view=rev
Log:
Fix up IPv6 address format to enclose it in []
Modified:
branches/coling/airtunes/src/modules/rtp/rtsp_client.c
Modified: branches/coling/airtunes/src/modules/rtp/rtsp_client.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/coling/airtunes/src/modules/rtp/rtsp_client.c?rev=2406&root=pulseaudio&r1=2405&r2=2406&view=diff
==============================================================================
--- branches/coling/airtunes/src/modules/rtp/rtsp_client.c (original)
+++ branches/coling/airtunes/src/modules/rtp/rtsp_client.c Sun May 11 17:12:20 2008
@@ -352,12 +352,14 @@
const char *res = NULL;
if (AF_INET == sa.sa.sa_family) {
- res = inet_ntop(sa.sa.sa_family, &sa.in.sin_addr, buf, sizeof(buf));
+ if ((res = inet_ntop(sa.sa.sa_family, &sa.in.sin_addr, buf, sizeof(buf)))) {
+ c->localip = pa_xstrdup(res);
+ }
} else if (AF_INET6 == sa.sa.sa_family) {
- res = inet_ntop(AF_INET6, &sa.in6.sin6_addr, buf, sizeof(buf));
+ if ((res = inet_ntop(AF_INET6, &sa.in6.sin6_addr, buf, sizeof(buf)))) {
+ c->localip = pa_sprintf_malloc("[%s]", res);
+ }
}
- if (res)
- c->localip = pa_xstrdup(res);
}
pa_log_debug("Established RTSP connection from local ip %s", c->localip);
More information about the pulseaudio-commits
mailing list