Fix wrong identifier in SO_NOSIGPIPE call.
[tinc] / src / tincctl.c
index 158dfed..b15676c 100644 (file)
@@ -763,7 +763,7 @@ bool connect_tincd(bool verbose) {
 
 #ifdef SO_NOSIGPIPE
        static const int one = 1;
-       setsockopt(c, SOL_SOCKET, SO_NOSIGPIPE, (void *)&one, sizeof one);
+       setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&one, sizeof one);
 #endif
 
        char data[4096];
@@ -1305,7 +1305,7 @@ char *get_my_name(bool verbose) {
                        continue;
                if(*value) {
                        fclose(f);
-                       return strdup(value);
+                       return replace_name(value);
                }
        }