summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGDR! <gdr@go2.pl>2014-12-11 20:47:19 +0100
committerGDR! <gdr@go2.pl>2014-12-11 20:47:19 +0100
commita60a3712c46bcef7dbb9c56c84693d070230c91b (patch)
treee4c85353bc7285f0847c18918af854cfae2fd7c6 /main.c
parenteee06b7d149e00a79897c1d17b0264af99e5149e (diff)
Got rid of some dead code
Diffstat (limited to 'main.c')
-rw-r--r--main.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/main.c b/main.c
index 24da759..bff4620 100644
--- a/main.c
+++ b/main.c
@@ -130,29 +130,11 @@ void set_tox_username(Tox *tox)
130 130
131 gethostname(hostname, 1024); 131 gethostname(hostname, 1024);
132 hostname[1023] = '\0'; 132 hostname[1023] = '\0';
133# if 0
134 memset(&hints, 0, sizeof hints);
135 hints.ai_family = AF_UNSPEC; /*either IPV4 or IPV6*/
136 hints.ai_socktype = SOCK_STREAM;
137 hints.ai_flags = AI_CANONNAME;
138
139 if ((gai_result = getaddrinfo(hostname, "ftp", &hints, &info)) != 0)
140 {
141 fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(gai_result));
142 exit(1);
143 }
144
145 for(p = info; p != NULL; p = p->ai_next)
146 {
147 printf("hostname: %s\n", p->ai_canonname);
148 }
149# endif
150 133
151 tox_set_name(tox, hostname, strlen(hostname)); 134 tox_set_name(tox, hostname, strlen(hostname));
152
153// freeaddrinfo(info);
154} 135}
155// get sockaddr, IPv4 or IPv6: 136
137/* Get sockaddr, IPv4 or IPv6 */
156void *get_in_addr(struct sockaddr *sa) 138void *get_in_addr(struct sockaddr *sa)
157{ 139{
158 if (sa->sa_family == AF_INET) 140 if (sa->sa_family == AF_INET)