[polypaudio-commits] r583 - /trunk/src/polypcore/socket-server.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Thu Feb 23 01:37:45 PST 2006
Author: ossman
Date: Thu Feb 23 10:37:44 2006
New Revision: 583
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=583&root=polypaudio&view=rev
Log:
inet_pton expects in[6]_addr structures, nothing else.
Modified:
trunk/src/polypcore/socket-server.c
Modified: trunk/src/polypcore/socket-server.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polypcore/socket-server.c?rev=583&root=polypaudio&r1=582&r2=583&view=diff
==============================================================================
--- trunk/src/polypcore/socket-server.c (original)
+++ trunk/src/polypcore/socket-server.c Thu Feb 23 10:37:44 2006
@@ -339,18 +339,18 @@
}
pa_socket_server* pa_socket_server_new_ip_string(pa_mainloop_api *m, const char *name, uint16_t port, const char *tcpwrap_service) {
- uint8_t ipv6[16];
- uint32_t ipv4;
+ struct in6_addr ipv6;
+ struct in_addr ipv4;
assert(m);
assert(name);
assert(port > 0);
- if (inet_pton(AF_INET6, name, ipv6) > 0)
- return pa_socket_server_new_ipv6(m, ipv6, port, tcpwrap_service);
+ if (inet_pton(AF_INET6, name, &ipv6) > 0)
+ return pa_socket_server_new_ipv6(m, ipv6.s6_addr, port, tcpwrap_service);
if (inet_pton(AF_INET, name, &ipv4) > 0)
- return pa_socket_server_new_ipv4(m, ntohl(ipv4), port, tcpwrap_service);
+ return pa_socket_server_new_ipv4(m, ntohl(ipv4.s_addr), port, tcpwrap_service);
pa_log_warn(__FILE__": failed to parse '%s'.", name);
More information about the pulseaudio-commits
mailing list