Commit d9bf9c75 authored by Jean-Paul Saman's avatar Jean-Paul Saman

dvbinfo: tcp fixes

parent 31f3c458
...@@ -80,7 +80,7 @@ int tcp_close(int fd) ...@@ -80,7 +80,7 @@ int tcp_close(int fd)
{ {
int result = 0; int result = 0;
result = shutdown(fd, 2); result = shutdown(fd, SHUT_RDWR);
if (result < 0) if (result < 0)
perror("tcp shutdown error"); perror("tcp shutdown error");
return result; return result;
...@@ -149,6 +149,8 @@ int tcp_open(const char *ipaddress, int port) ...@@ -149,6 +149,8 @@ int tcp_open(const char *ipaddress, int port)
perror( "tcp connect error" ); perror( "tcp connect error" );
continue; continue;
} }
break; /* success */
} }
freeaddrinfo(addr); freeaddrinfo(addr);
......
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