Skip to content
This repository has been archived by the owner on Dec 8, 2019. It is now read-only.

Commit

Permalink
Use domain instead of IP for default server.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nutomic committed Mar 8, 2016
1 parent ca2c4c6 commit 127acfb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class FirstStartActivity extends AppCompatActivity with OnEditorActionListener w
.putBoolean(KeyNotificationSoundsOn, DefaultNotificationSoundsOn)
.putString(KeyScanInterval, DefaultScanInterval.toString)
.putString(KeyMaxConnections, DefaultMaxConnections.toString)
.putString(KeyServers, DefaultServers.mkString(", "))
.putString(KeyServers, DefaultServers)
.apply()

startMainActivity()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ object SettingsInterface {
val DefaultScanInterval = 15
val DefaultNotificationSoundsOn = true
val DefaultMaxConnections = 1000000
val DefaultServers = Set("46.101.249.188:26344", "46.101.238.107:26344")
// When updating this, be sure to adjust the code in [[InternetInterface.create]].
val DefaultServers = Set("ensichat.nutomic.com:26344").mkString(", ")

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ class InternetInterface(connectionHandler: ConnectionHandler, crypto: Crypto,
* Initializes and starts discovery and listening.
*/
override def create(): Unit = {
val servers = settings.get(SettingsInterface.KeyServers, "")
.replace("46.101.249.188:26344", SettingsInterface.DefaultServers)
settings.put(SettingsInterface.KeyServers, servers)

FutureHelper {
serverThread.start()
openAllConnections(maxConnections)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ object Main extends App with CallbackInterface {
KeyFolder.mkdirs()
Log.setLogInstance(logInstance)
sys.addShutdownHook(connectionHandler.stop())
settings.put(KeyServers, DefaultServers.mkString(", "))
settings.put(KeyServers, DefaultServers)

val parser = new OptionParser[Config]("ensichat") {
head("ensichat")
Expand Down

0 comments on commit 127acfb

Please sign in to comment.