summaryrefslogtreecommitdiff
path: root/toxcore/network.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/network.c')
-rw-r--r--toxcore/network.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/toxcore/network.c b/toxcore/network.c
index a44ef4c4..e04d2608 100644
--- a/toxcore/network.c
+++ b/toxcore/network.c
@@ -352,10 +352,6 @@ Networking_Core *new_networking(IP ip, uint16_t port)
352 fcntl(temp->sock, F_SETFL, O_NONBLOCK, 1); 352 fcntl(temp->sock, F_SETFL, O_NONBLOCK, 1);
353#endif 353#endif
354 354
355#ifdef LOGGING
356 loginit(ntohs(port));
357#endif
358
359 /* Bind our socket to port PORT and the given IP address (usually 0.0.0.0 or ::) */ 355 /* Bind our socket to port PORT and the given IP address (usually 0.0.0.0 or ::) */
360 uint16_t *portptr = NULL; 356 uint16_t *portptr = NULL;
361 struct sockaddr_storage addr; 357 struct sockaddr_storage addr;
@@ -461,6 +457,8 @@ Networking_Core *new_networking(IP ip, uint16_t port)
461 if (!res) { 457 if (!res) {
462 temp->port = *portptr; 458 temp->port = *portptr;
463#ifdef LOGGING 459#ifdef LOGGING
460 loginit(temp->port);
461
464 sprintf(logbuffer, "Bound successfully to %s:%u.\n", ip_ntoa(&ip), ntohs(temp->port)); 462 sprintf(logbuffer, "Bound successfully to %s:%u.\n", ip_ntoa(&ip), ntohs(temp->port));
465 loglog(logbuffer); 463 loglog(logbuffer);
466#endif 464#endif