]> git.meshlink.io Git - catta/commitdiff
* change setsocktopt for IP_TTL to use an int instead of an uin8_t for compatibility...
authorLennart Poettering <lennart@poettering.net>
Mon, 24 Oct 2005 23:33:08 +0000 (23:33 +0000)
committerLennart Poettering <lennart@poettering.net>
Mon, 24 Oct 2005 23:33:08 +0000 (23:33 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@858 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/socket.c

index b3bdac23a226d276c3c71a493bd42574421eb0e9..ef421c9f2218ce944cb882d856f3da2f97374db6 100644 (file)
@@ -292,7 +292,7 @@ static int ipv6_pktinfo(int fd) {
 
 int avahi_open_socket_ipv4(int no_reuse) {
     struct sockaddr_in local;
-    int fd = -1, r;
+    int fd = -1, r, ittl;
     uint8_t ttl, cyes;
         
     if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
@@ -306,8 +306,8 @@ int avahi_open_socket_ipv4(int no_reuse) {
         goto fail;
     }
 
-    ttl = 255;
-    if (setsockopt(fd, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)) < 0) {
+    ittl = 255;
+    if (setsockopt(fd, IPPROTO_IP, IP_TTL, &ittl, sizeof(ittl)) < 0) {
         avahi_log_warn("IP_TTL failed: %s", strerror(errno));
         goto fail;
     }