diff options
Diffstat (limited to 'app/src/main/java/org/pacien/tincapp/activities/status')
2 files changed, 13 insertions, 13 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/activities/status/networkinfo/VpnInterfaceConfigurationFormatter.kt b/app/src/main/java/org/pacien/tincapp/activities/status/networkinfo/VpnInterfaceConfigurationFormatter.kt index 2956cb4..dcab449 100644 --- a/app/src/main/java/org/pacien/tincapp/activities/status/networkinfo/VpnInterfaceConfigurationFormatter.kt +++ b/app/src/main/java/org/pacien/tincapp/activities/status/networkinfo/VpnInterfaceConfigurationFormatter.kt | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon | 2 | * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon |
3 | * Copyright (C) 2017-2018 Pacien TRAN-GIRARD | 3 | * Copyright (C) 2017-2020 Pacien TRAN-GIRARD |
4 | * | 4 | * |
5 | * This program is free software: you can redistribute it and/or modify | 5 | * This program is free software: you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
@@ -30,7 +30,7 @@ object VpnInterfaceConfigurationFormatter { | |||
30 | 30 | ||
31 | fun formatList(list: List<Any>?) = when { | 31 | fun formatList(list: List<Any>?) = when { |
32 | list != null && list.isNotEmpty() -> list.joinToString("\n", transform = this::formatListElement) | 32 | list != null && list.isNotEmpty() -> list.joinToString("\n", transform = this::formatListElement) |
33 | else -> resources.getString(R.string.status_network_info_value_none)!! | 33 | else -> resources.getString(R.string.status_network_info_value_none) |
34 | } | 34 | } |
35 | 35 | ||
36 | private fun formatListElement(element: Any) = when (element) { | 36 | private fun formatListElement(element: Any) = when (element) { |
diff --git a/app/src/main/java/org/pacien/tincapp/activities/status/nodes/NodeInfo.kt b/app/src/main/java/org/pacien/tincapp/activities/status/nodes/NodeInfo.kt index 06725dc..6523250 100644 --- a/app/src/main/java/org/pacien/tincapp/activities/status/nodes/NodeInfo.kt +++ b/app/src/main/java/org/pacien/tincapp/activities/status/nodes/NodeInfo.kt | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon | 2 | * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon |
3 | * Copyright (C) 2017-2018 Pacien TRAN-GIRARD | 3 | * Copyright (C) 2017-2020 Pacien TRAN-GIRARD |
4 | * | 4 | * |
5 | * This program is free software: you can redistribute it and/or modify | 5 | * This program is free software: you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
@@ -80,18 +80,18 @@ data class NodeInfo(val name: String, | |||
80 | id = matcher[2], | 80 | id = matcher[2], |
81 | ip = matcher[3], | 81 | ip = matcher[3], |
82 | port = matcher[4], | 82 | port = matcher[4], |
83 | cipher = matcher[5].toInt(), | 83 | cipher = matcher[5]!!.toInt(), |
84 | digest = matcher[6].toInt(), | 84 | digest = matcher[6]!!.toInt(), |
85 | macLength = matcher[7].toInt(), | 85 | macLength = matcher[7]!!.toInt(), |
86 | compression = matcher[8].toInt(), | 86 | compression = matcher[8]!!.toInt(), |
87 | options = matcher[9].toInt(16), | 87 | options = matcher[9]!!.toInt(16), |
88 | status = matcher[10].toInt(16), | 88 | status = matcher[10]!!.toInt(16), |
89 | nextHop = matcher[11], | 89 | nextHop = matcher[11], |
90 | via = matcher[12], | 90 | via = matcher[12], |
91 | distance = matcher[13].toInt(), | 91 | distance = matcher[13]!!.toInt(), |
92 | pMtu = matcher[14].toInt(), | 92 | pMtu = matcher[14]!!.toInt(), |
93 | minMtu = matcher[15].toInt(), | 93 | minMtu = matcher[15]!!.toInt(), |
94 | maxMtu = matcher[16].toInt() | 94 | maxMtu = matcher[16]!!.toInt() |
95 | ) | 95 | ) |
96 | 96 | ||
97 | private operator fun Matcher.get(index: Int) = group(index) | 97 | private operator fun Matcher.get(index: Int) = group(index) |