From ae5cea7f365f7cef51b9cd0faecfd1c0ff7433fd Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Wed, 29 Jun 2016 11:59:43 -0400 Subject: [PATCH] change order of initialization --- Daemon.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Daemon.cpp b/Daemon.cpp index a5628414..a3b8ee09 100644 --- a/Daemon.cpp +++ b/Daemon.cpp @@ -130,13 +130,9 @@ namespace i2p ipv4 = false; ipv6 = true; #endif - - uint16_t port; i2p::config::GetOption("port", port); - if (!i2p::config::IsDefault("port")) - { - LogPrint(eLogInfo, "Daemon: accepting incoming connections at port ", port); - i2p::context.UpdatePort (port); - } + + i2p::context.SetSupportsV6 (ipv6); + i2p::context.SetSupportsV4 (ipv4); bool nat; i2p::config::GetOption("nat", nat); if (nat) @@ -163,6 +159,15 @@ namespace i2p } } + + uint16_t port; i2p::config::GetOption("port", port); + if (!i2p::config::IsDefault("port")) + { + LogPrint(eLogInfo, "Daemon: accepting incoming connections at port ", port); + i2p::context.UpdatePort (port); + } + + bool transit; i2p::config::GetOption("notransit", transit); i2p::context.SetSupportsV6 (ipv6); i2p::context.SetSupportsV4 (ipv4);