]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
tcp: fix error msg
authorJaroslav Kysela <perex@perex.cz>
Fri, 28 Nov 2014 12:48:06 +0000 (13:48 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 28 Nov 2014 12:48:06 +0000 (13:48 +0100)
src/tcp.c

index dc5d18231e52962946c3f6b3a6d5fad71deb562c..3e6e771468ec74e54832a1b9ad1182357a2b315e 100644 (file)
--- a/src/tcp.c
+++ b/src/tcp.c
@@ -84,8 +84,9 @@ tcp_connect(const char *hostname, int port, const char *bindaddr,
       ip.ss_family = ai->ai_family;
       if (inet_pton(AF_INET, bindaddr, IP_IN_ADDR(ip)) <= 0 ||
           bind(fd, (struct sockaddr *)&ip, IP_IN_ADDRLEN(ip)) < 0) {
-        snprintf(errbuf, errbufsize, "Cannot bind to IPv%s addr '%s'", bindaddr,
-                                     ai->ai_family == AF_INET6 ? "6" : "4");
+        snprintf(errbuf, errbufsize, "Cannot bind to IPv%s addr '%s'",
+                                     ai->ai_family == AF_INET6 ? "6" : "4",
+                                     bindaddr);
         freeaddrinfo(ai);
         return -1;
       }