Subject | Hash | Author | Date (UTC) |
---|---|---|---|
Got rid of some dead code | a60a3712c46bcef7dbb9c56c84693d070230c91b | GDR! | 2014-12-11 19:47:19 |
Make localhost work even if regular name resolution fails | eee06b7d149e00a79897c1d17b0264af99e5149e | GDR! | 2014-12-11 19:38:38 |
Readme tweaks | 6bb15840b0bde8e5949e76873aec418f2b64951f | GDR! | 2014-12-11 18:41:19 |
License | 0974ae043fe15596554512560f72a0a08863e282 | GDR! | 2014-12-11 18:37:29 |
mention build.md | 13f31613c0a89007baef47d8e4d5d1e47c4d4ff9 | GDR! | 2014-12-11 18:32:25 |
Help on -C switch | ab22ba6bcbc395527950fcb9743080c651ab5ef8 | GDR! | 2014-12-11 18:31:13 |
Bare bones documentation | aada851bb2c5576ba9afb1a486ea4b01e0c05ac3 | GDR! | 2014-12-11 18:30:14 |
Initial commit | 4c36e3b71adab6e9f3f08fda3b5c7bf5714ef201 | GDR! | 2014-12-11 13:27:41 |
Server state loading/saving | 7cb0f811c9a573342ec390080ac67e640d0f2e30 | GDR! | 2014-11-26 12:55:12 |
Multi-connection support client-side. | 16add85eb81629b07dd7bdb04fbe30be1410cc83 | GDR! | 2014-11-25 22:09:45 |
TCP works, yay | c311fb3bdd2c26c347c2dd734f97003ac0538037 | GDR! | 2014-11-16 02:54:56 |
creating tunnels half-made | 9b523f2b826dea54613f2eac78f754c9772841b6 | GDR! | 2014-11-15 19:14:53 |
builds well | 3b42ed1ca1be6d1c8f14606befee8b8deae64ac8 | GDR! | 2014-11-10 18:05:14 |
makefile | f877c04fdb45aebff081df4ed1b7fea9bd293fa5 | GDR! | 2014-11-09 16:24:12 |
File | Lines added | Lines deleted |
---|---|---|
main.c | 2 | 20 |
File main.c changed (mode: 100644) (index 24da759..bff4620) | |||
... | ... | void set_tox_username(Tox *tox) | |
130 | 130 | ||
131 | 131 | gethostname(hostname, 1024); | gethostname(hostname, 1024); |
132 | 132 | hostname[1023] = '\0'; | 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 | 134 | tox_set_name(tox, hostname, strlen(hostname)); | 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 */ | ||
156 | 138 | void *get_in_addr(struct sockaddr *sa) | void *get_in_addr(struct sockaddr *sa) |
157 | 139 | { | { |
158 | 140 | if (sa->sa_family == AF_INET) | if (sa->sa_family == AF_INET) |