Commit 5eaf7fd1 authored by lucabe's avatar lucabe

Reindent after last commit


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10882 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 75779734
...@@ -120,13 +120,14 @@ static struct addrinfo* udp_ipv6_resolve_host(const char *hostname, int port, in ...@@ -120,13 +120,14 @@ static struct addrinfo* udp_ipv6_resolve_host(const char *hostname, int port, in
if ((hostname) && (hostname[0] != '\0') && (hostname[0] != '?')) { if ((hostname) && (hostname[0] != '\0') && (hostname[0] != '?')) {
node = hostname; node = hostname;
} }
memset(&hints, 0, sizeof(hints)); memset(&hints, 0, sizeof(hints));
hints.ai_socktype = type; hints.ai_socktype = type;
hints.ai_family = family; hints.ai_family = family;
hints.ai_flags = flags; hints.ai_flags = flags;
if ((error = getaddrinfo(node, service, &hints, &res))) { if ((error = getaddrinfo(node, service, &hints, &res))) {
av_log(NULL, AV_LOG_ERROR, "udp_ipv6_resolve_host: %s\n", gai_strerror(error)); av_log(NULL, AV_LOG_ERROR, "udp_ipv6_resolve_host: %s\n", gai_strerror(error));
} }
return res; return res;
} }
...@@ -153,23 +154,23 @@ static int udp_ipv6_set_local(URLContext *h) { ...@@ -153,23 +154,23 @@ static int udp_ipv6_set_local(URLContext *h) {
char hbuf[NI_MAXHOST]; char hbuf[NI_MAXHOST];
struct addrinfo *res0 = NULL, *res = NULL; struct addrinfo *res0 = NULL, *res = NULL;
res0 = udp_ipv6_resolve_host(0, s->local_port, SOCK_DGRAM, AF_UNSPEC, AI_PASSIVE); res0 = udp_ipv6_resolve_host(0, s->local_port, SOCK_DGRAM, AF_UNSPEC, AI_PASSIVE);
if (res0 == 0) if (res0 == 0)
goto fail; goto fail;
for (res = res0; res; res=res->ai_next) { for (res = res0; res; res=res->ai_next) {
udp_fd = socket(res->ai_family, SOCK_DGRAM, 0); udp_fd = socket(res->ai_family, SOCK_DGRAM, 0);
if (udp_fd > 0) break; if (udp_fd > 0) break;
perror("socket"); perror("socket");
} }
if (udp_fd < 0) if (udp_fd < 0)
goto fail; goto fail;
if (bind(udp_fd, res0->ai_addr, res0->ai_addrlen) < 0) { if (bind(udp_fd, res0->ai_addr, res0->ai_addrlen) < 0) {
perror("bind"); perror("bind");
goto fail; goto fail;
} }
freeaddrinfo(res0); freeaddrinfo(res0);
res0 = NULL; res0 = NULL;
addrlen = sizeof(clientaddr); addrlen = sizeof(clientaddr);
......
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